Hi, I was wondering.if anyone could help with a mini sumo program for the zumo robot v1.2 and the GP2Y0A21YK0F or the GP2Y0A02YK0F analog distance sensor. I have a competition called The NRC in 2 weeks and I need some help programming it. I know how to program the robot but not the sensor. Thanks!
I know how to program the robot but not the sensor.
Is the sensor really programmable?
Links are useful, is want more than commiseration.
Is there anyway to use the data from the sensor to make the robot work. Like an ultrasonic sensor for the lego mindstorm? thenrc.org might help for finding the size of the ring. You can find the rest of the parts for pololu.com. Also, I have an arduino uno rev3
Did you look for a data sheet even? You put 5V in, and get between 0.5 and 3V out depending on the distance to the obstacle, see Fig2.
Our friend Google gives over 20k hits for "gp2y0a02yk0f arduino".
It's a simple analog sensor, no different from reading a potentiometer, which is literally the first of the Arduino examples here or in the IDE File > Examples > 1 Basics.
You will need to decide what to do with that value of course, say with an "if" to compare it to some threshold and then do, or not do, some stuff.