In this session of TechnoClub we start adding more outputs to our controller for improved feedback.
A motor must have:
A connection to negative (-)
A connection to a power source
This could be a pin on the Arduino that gets turned on or off via code.
OR this source could be a positive 5V pin. This means the motor will always be on.
To program our motor we must set the pin it's connected to HIGH if we want the motor to run and LOW when we don't. If we forget to set it LOW the motor will run forever.
This circuit combines all that we've covered so far. If you need to recap how we wired up LEDs and Buttons, look at the pages for Session 1 and Session 2.
Here we create two Variables to grab and store the input from the buttons. Notice that only one button will make the controller vibrate.