gj01-15
Controlling Two Motors
XCSB Basic, 20 Points
OEES 215

Back to Main Page
 
In notepad, bring up either the flashing light program or the sound program. Then, modify it so that it will work as follows:
  1. When switch 0 is turned on, motor 0 starts running.
  2. Motor 0 will then run for 2 seconds and stop.
  3. When motor 0 stops, motor 1 will start running.
  4. Motor 1 will run for 4 seconds and stop.
  5. If switch 0 is still on when motor 1 stops, the above cycle will repeat. Otherwise, both motors will stay stopped.
  6. Once you've gotten the program to turn on LEDs 0 and 1 correctly, connect your microcontroller card to a motor driver card and have your program control real motors.
 
Back to Main Page