Download presentation
Presentation is loading. Please wait.
1
LED and a Button
2
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.
3
Digital Input Background
Reseach Pull-up and Pull-down resistors Read the Arduino reference page on Digital Pins 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?
4
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
5
Wiring Schematic Does your button match this wiring diagram?
Digital Input Schematic
6
LED + Button Picture
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.