LED and a Button
Led Output For the brains of our thermo chamber we will be using an Arduino Mega as it provides far more input/output pins than the Uno We are going to setup a button to digitally control an LED using a program on the Arduino. Example code is on course site Use pin 22 as the output to power the LED, as in the Blink program created earlier.
Digital Input Background Reseach Pull-up and Pull-down resistors http://en.wikipedia.org/wiki/Pull-up_resistor Read the Arduino reference page on Digital Pins http://arduino.cc/en/Tutorial/DigitalPins Read over the Arduino Digital Input excerpt from the Arduino Programming Notebook (on Coursesite) What is the digital input threshold? Could you figure it out through experimentation?
Adding a button What is the button schematic? No part number – Use an ohm meter to figure it out yourself We will use a Pull-down resistor based upon the schematic from the Arduino Digital Input diagram Use pin 23 as the input channel to tell the Arduino when to turn on the LED Example Button http://www.cooking-hacks.com/index.php/momentary-push-button-switch-12mm-square.html
Wiring Schematic Does your button match this wiring diagram? Digital Input Schematic
LED + Button Picture