Thursday, December 8, 2016

Final Project: Distance Sensor

The other input besides motion detection that I wanted was distance. I mapped the analog input of the sonar rangefinder to the speed of the motor so that the closer something was, the faster the motor went.

The rangefinder can sometimes seem a little unreliable. It will occasionally jump between huge values even though what it's looking at hasn't come any closer.

Demonstration

The smaller motor will be linked to the rangefinder, and the larger motor, to the motion detector.

No comments:

Post a Comment