Get both wheels turning

posted Mar 15, 2016, 11:49 AM by Tony Farley   [ updated Mar 17, 2016, 12:48 PM ]
Create two separate circuits using transistors to power the wheels separately. You will power the transistor with pins 12 and 13.

Here's the circuit:

void setup() {
  // initialize digital pin 13 as an output.
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);

void loop() {
  digitalWrite(12, HIGH);   // turns the moto on (HIGH is the voltage level)
  digitalWrite(13, HIGH);  
  delay(1000);              // wait for a second
  digitalWrite(12, LOW);    // turn the motor off by making the voltage LOW
  digitalWrite(13, LOW);  
  delay(1000);              // wait for a second

To do: 

1. Create a program that will turn on both wheels for a second, then both off for a second, then one wheel on for a second (a turn), then both wheels on for another second. 
2. Post a picture or video of your robot on your website.
3. Post the program that does #1.
4. Explain what you did with your robot and what the program makes it do.