Pages

Thursday, September 26, 2013

Arduino Pre-Lab for Lab 4

Arduino Pre-Lab

The past two lab meetings have provided an introduction to the Arduino Board. By this time you should be relatively comfortable with 
  1. Connecting the Arduino board to the PC, selecting the correct board type and selecting the correct COM port.
  2. Using the digitalWrite function to "blink" an LED
  3. Using the digitalRead function to accept input from a push button
(this of course assumes that you actually have a board - if you don't have one, please read the previous post, and try to get together with someone who has a kit to go through the following exercises)


Pre-Lab Task 1 - SIK Circuits

The Sparkfun Inventors Kit Guide provides instructions for 15 circuits. You should set up and run the following circuits...

Circuit 1 - Blinking a LED .... we have already done this
Circuit 2 - Potentiometer   .... introduction to AnalogRead function
Circuit 3 - RGB LED        .... introduction to Pulse Width Modulation (PWM)
Circuit 4 - Multiple LEDs  .... this has been demonstrated in lab - see blog post on LED Array
Circuit 5 - Push Buttons    .... this is a variation of what was covered in this week's lab
Circuit 8 - A Single Servo .... its time to get stuff moving...


Pre-Lab Task 2 - LED's, Buttons and functions

Set up the multiple LED circuit shown in the Lab 3 blog post. Once you have the circuit configured load the code and test the circuit. Then print out the code and examine it carefully to see how functions are used to create more readable code.

See if you can figure out how to add in a function that can be used to control the position of a servo motor as well as the indicator light. This is show in the video below...

You should have this circuit laid-out on your breadboard when you come to lab next week.


Pre-Lab Task 3 - Video Tutorials

The following three videos should complement the preceding two tasks and hopefully provide you with some additional insight on how to get the Arduino to do your bidding...