You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We used Sharp IR sensors in the last several years' robots. They provide an analog voltage which varies according to the distance to the nearest object. A graph of voltage-versus-distance is provided in the datasheets for these sensors.
It would be useful to have a wrapper class that knows how to interpret the values to turn into a distance, e.g. 2.3 volts = 17 cm, or whatever. Instead of using if/else or case statements, we could come up with a mathematical formula that fits the curve
Hint: people have already written some of these for Arduino - Google them up, find and port them over!
The text was updated successfully, but these errors were encountered:
We used Sharp IR sensors in the last several years' robots. They provide an analog voltage which varies according to the distance to the nearest object. A graph of voltage-versus-distance is provided in the datasheets for these sensors.
It would be useful to have a wrapper class that knows how to interpret the values to turn into a distance, e.g. 2.3 volts = 17 cm, or whatever. Instead of using if/else or case statements, we could come up with a mathematical formula that fits the curve
Hint: people have already written some of these for Arduino - Google them up, find and port them over!
The text was updated successfully, but these errors were encountered: