AccelMotorControl
Description:
The AccelMotorControl class is meant to be run on a free SPOT. The AccelMotorControl class begins sending commands based on accelerometer readings to a listening SPOT (running AccelMotorReceiver) when the run() method is called. It is meant to control the movement of a SPOTBot by tilting a free SPOT left, right, forward, and backward. Additional functions include a right turn mode.
Sent messages include turn left, right, backward left, backward right, left 90 degrees, right 90 degrees, backward left 90 degrees, backward right 90 degrees, spin left, spin right, spin left 90 degrees, spin right 90 degrees, move forward, move backward, and stop; all depending on how the SPOT is tilted and whether or not the right angle mode button is pressed in.
Click here for source code.
Special Requirements:
- Must be deployed on a free SPOT (so you can tilt it and use the accelerometer)
- A SPOTBot must have AccelMotorReceiver deployed in order to receive the messages
