3. Chapter 2: LEDs with Arduino
Questions, Problems,
Difficulties you encountered?
4. Chapter 2: Digital Inputs, Outputs, and
Pulse-Width Modulation
Chapter 2: Digital Inputs, Outputs, and Pulse-Width
Modulation
1.Turning on an LED—led.ino
2.LED with Changing Blink Rate—blink.ino
3.LED Fade Sketch—fade.ino
4.Simple LED Control with a Button—led_button.ino
5.Debounced Button Toggling—debounce.ino
6.Toggling LED Nightlight—rgb_nightlight.ino
5. Troubleshooting
Tips:
• Follow Red/Black, Positive/Negative conventions
• If something isn't going in, put in the jumper
cable a few time to make it smoother
When things aren't working:
• Check where current and ground are connect to
• Check orientation of LED
• Check everything is plugged in correctly
according to diagram
• Check everything is plugged in all the way
Anything else we can add?
8. Chapter 3: Reading Analog Sensors
www.exploringarduino.com/content/ch3 .
Chapter 3: Reading Analog Sensors
1. Potentiometer Reading Sketch—pot.ino
2. Temperature Alert Sketch—tempalert.ino
3. Automatic Nightlight Sketch—nightlight.ino
9. Chapter 3: Reading Analog Sensors
www.exploringarduino.com/content/ch3 .
• A switch is a digital input—it has only two possible states: on or off, high or
low, 1 or 0, and so on.
• Analog signals are those that cannot be discretely classified; they vary
within a range, theoretically taking on an infinite number of possible
values within that range.
• Potentiometers are variable voltage dividers
• Potentiometers are symmetrical, so it doesn’t matter which side you
connect the 5V and ground to.
• As you turn the potentiometer, you vary the voltage that you are feeding
into analog input 0 between 0V and 5V
14. For next week:
• Read Chapter 3: Digital Inputs, Outputs, and Pulse-Width
Modulation
• Complete all three Chapter 3 projects
• *Additional: Watch the video tutorials -
https://www.youtube.com/watch?v=_LCCGFSMOr4&list=PLA567CE235D39FA84&index=2
Good luck with midterms! See you two week!