Hello all, I hope that someone could help me with this. Here's a little run-down of my project plan;
I'm trying to create a robot that continues until it senses a wall about 5 to 10 millimeters away (in it's front sensor) and evaluates which way it can turn. I have no problem programming everything else, but I'm having a hard time getting started with this sensor that I purchased.
Here is the link to it: https://www.adafruit.com/products/1927
I would like to be able to have it simply read a 0 or a 1 depending on whether or not a wall was the mentioned distance in front of it, but I can't seem to get it to work. I have plugged it into A0, but I keep getting many values, not 0 or 1. If anyone would be able to simply provide this code to have it register a value of 1 or 0, that would be fantastic!
Thanks in advance! (let me know if you need any more info)