That sensor you are trying to use is compatible with vex, it is sold at Sparkfun, mouser, and digikey depending on where you want to buy it.
This is the basic one not short or long range just the middle standard range sensor. Not that there is any difference the variants simply measure longer or shorter ranges.
It has a 3 wire interface, 1 for vcc (positive +5v) , 1 for ground (negative) , and 1 for the analog signal wire. On the vex you would hook it up to one of the ADC ports on the side where you would hook up for example a light sensor. In fact it works the same way as the vex light sensor and you might even be able to just use it as a “light sensor”’ easy c doesn’t know what is hooked up to the port all it does is take an analog reading from the pin and allow you to use that value (0 to like 1024 something) this is a 10 bit resolution for a micro controller. However this value wouldn’t be a “light intensity measurement” you would run it through the formula in the data sheet and what you would be left with is well a distance!
So in a nutshell the red and black wire would connect to the positive and negative wires on a sensor cable to the vex and the white wire would connect to the signal pin. All you would do is take an analog reading on that pin and run it through the formula in the datasheet and voila you have a distance!
The final verdict is yes IT IS COMPATIBLE with anything that can take an ADC reading including the vex micro controller!
Have you or anyone else ever tried to do this? Do you know if infrared sensors are affected my things on an angle to the senso like ultrasonic sensors are? The ultrasonic sensors wont see a wall when it is an an angle to the sensor… Will the infrared sensors solve this issue?
I posted this only 6 minutes after the actual creator of the robot below posted the exact same thing lol.
I just found a few pictures in the image gallery from a few years back of a robot that I remember glancing at (a few years back)… It uses an IR sensor to get distance readings, now that sensor is mounted on a motor so that it can turn and get sensor readings all around the room from one point (it was called a “mapping rover”). I haven’t personally used this sensor but from what was done on this bot I think that it’s well worth looking into in your case.
This is a program written by the person that plots the distances and motor position’s onto the screen. Looking at the output on the screen I would say that the sensor looks to be pretty darn accurate.
I can’t guarantee that this will solve your issue but in my opinion it should be more reliable and much less prone to having false readings.
Well my students ordered 2 of each the short mid and long range sharp sensors… I will post results as to how they work, and what our findings are. We are building not only the sumo robot, but also some maze robots so it will be interesting to see how these sensors work in comparison to the ultrasonics. I am just learning all this programing and sensor stuff with the students so I appreciate all the help!