This script is for a vehicle in which pins 0 and 16 control the left hand motor.
Pins 8 and 12 control the right hand motor.
By writing an analog value to a pin it is possible to set the speed of the motor.
1023 is the maximum speed. Any value can be set between 0 and 1023.
This script will set the right hand motor turning at maximum speed and the left hand motor turning at half speed.
Each motor is controlled by 2 pins to go forward (1,0), back (0,1), coast (0,0) or brake (1,1). Digital pins 8 and 12 control one motor, and 0 and 16 the other. The LED display can be programmed to display an appropriate symbol (⇧⇨⇩⇦) for each of the four sections so it can be tested without the buggy. From experimentation we found that the buggy moves 30 mm in 1 second (this will depend on the motors used).