Step 6: Creating the Software
Source Code (Arduino Sketch and modified Ping library) are at http://polymythic.com/HALO_SourceCode_v8.zip
The flow of the main program loop() is:
- Fire sensor,
- Check to see if any of the motors are supposed to turn on or off based on previous range finding
- Fire next sensor.. Repeat
Other Things to Note As You Look At The Code:
There are 4 "intensities" of motor pulsing to give the person a better sense of the range, and these vary by the foot (up to 4 feet)
This is based on an state-machine model, but one of the Arduino threading libraries could be used to handle this independently.
Remove these ads by
Signing Up
























Not Nice














Visit Our Store »
Go Pro Today »



