[Challenge 8-1]
Here we built the base of our MotorCar!
[Challenge 8-2]
To control our MotorCar, we devised multiple codes: forward, backward, coast, brake, spin right, spin left, bear right and bear left.
[Challenge 8-3]
We implemented the 'init' program from which we can use 'count+' and 'count-' system to detect the rotation on on the motor. It was a bit confusing wiring up the motors so that counta increases as left motor goes forward and countb increases as the right motor goes forward. After wiring up the motors correct, we tested out our code below so that the wheels move forward until the count count-a is 1000 and backward until count-a is back to zero. The number printed out at the bottom is count-a after the code is taken place. It is a less than one rotation backward (one rotation = 180) because the wheels have moved backward just a little bit after the brake.
Here we built the base of our MotorCar!
[Challenge 8-2]
To control our MotorCar, we devised multiple codes: forward, backward, coast, brake, spin right, spin left, bear right and bear left.
[Challenge 8-3]
We implemented the 'init' program from which we can use 'count+' and 'count-' system to detect the rotation on on the motor. It was a bit confusing wiring up the motors so that counta increases as left motor goes forward and countb increases as the right motor goes forward. After wiring up the motors correct, we tested out our code below so that the wheels move forward until the count count-a is 1000 and backward until count-a is back to zero. The number printed out at the bottom is count-a after the code is taken place. It is a less than one rotation backward (one rotation = 180) because the wheels have moved backward just a little bit after the brake.