Shop OBEX P1 Docs P2 Docs Learn Events
Reading analog sensor — Parallax Forums

Reading analog sensor

martin8675309martin8675309 Posts: 1
edited 2010-09-10 11:18 in Accessories
I was looking for some code examples of how I can take a R146-GP2D120 sensor http://www.acroname.com/robotics/parts/R146-GP2D120.html that has a range of 1.6" - 12" to only see anything within a 4 inch range. I want to wave a hand in front of a lamp twice to turn it on but I don't understand how you would code this for the BS2 to go high when it sees a certain voltage when a hand is within 4 inches of the sensor. I am just learning so if you could really explain it that would be most helpful.

Thanks

Comments

Sign In or Register to comment.