I need help with the ET sensor. I have tried making multiple programs to have the robot wait until a certain value is reached with the ET sensor, however I have had no luck. From the Link's sensor list, and a short program that I created, the ET sensor's reading stays relatively the same (about 860 on the Link's sensor list and 220 on the short program I created).
A short explanation of how to use the ET sensor and maybe even an example code would be great!
(Attached is the program that I created to display the ET sensor's value)
Thanks!
~Harrison
Attachment | Size |
---|---|
ETSensor_v1.c | 439 bytes |
Hi Harrison,
Analog ports have two modes, "floating" and "pullup". The default is pullup, which is what light sensors and top hats use. The ET requires floating mode to have good resolution. There's a function in the Link libraries to disable pullup mode. I'm on a computer without KISS-IDE installed, so I can't check the exact name of the function, but I think it's something like "set_analog_pullups". Look in the manual for a function with a similar name; it should solve your problem.
Good luck!
PS: Sorry for the delayed reply, I was away for the weekend and didn't notice your post until now.
-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS
Thank you for the info! That definitely clears it up! I will try as soon as I can to incorporate this info into my example program. Once finished (or not), I will reply back to this thread to inform if it works or if I have any further questions.
Thanks again!
~Harrison
Yes! I think I got it! Just like you said, I added the function set_analog_pullup to the beginning of the program. When I ran it, it displays at most 150 (about 1 1/2 inches from a surface) and at least 2 or 3 (really far away or touching the surface).
Thank you for all of the help!
~Harrison
P.S. Here's the code:
Awesome, happy to help.
-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS
I'm not confused about a lot of things, but, this time, I am confused about why you used analog instead of analog10? I mean, Jeremy didn't comment on it so I must have missed something. I know that analog10 has 1024 bytes but, doesn't the ET display with 1024 bytes. And, one of the professors at USC told me to use analog10. Please reply. Thanks.
analog10 is higher resolution than analog (10-bit vs 8-bit), but the extra 2 bits don't usually matter. There's no harm in using analog10, and it's what I recommend, but some people use analog without any trouble.
-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS
Oh, ok, thanks, I'm glad I wasn't wrong. Thanks for clearing my confusion. Relieved that I'm not missing out, lol.
I'm new and I'm interested in this topic. Thank you!
192.168.o.1
Recently I have come across this site and little bit confused about the subject you have described here. Actually I don’t have any idea regarding this et-sensor. Here I have only seen some comments regarding the topic. If you share more details, it would be better for people like us.amsterdam tours
It is the first time I am hearing of this sensor. What is this sensor all about? How is it used in the industry? It will be good if you share some details of the sensor so that all are aware of it. printer problems in windows