9.13 Lab Exercises

Lab assignment #4

 

4.1  “Hello World”: Download the Arduino IDE onto your computer, connect an LED (with 1K current-limiting resistor) to pin 12, and write a script to cause the LED to blink on and off at 2 Hz. (Nothing to turn in for this exercise)

4.2 Rainbow. Program your Arduino Uno to control your RGB LED to continually sequence through the colors of the rainbow (R, O, Y, G, B, V) at a rate set by your program.  Adapt your program to sequence forward (R-O-Y-G-B-V- R-O-Y- etc..) or reverse (R-V-B-G-Y-O-R-V-B- etc…) based on the High or Low value of an input pin. (Nothing to turn in for this exercise)

4.3 Do one of the following:

Option 1. Implement a system to measure the temperature of the room you’re in, turning on a green LED when the temperature is below 70 degrees and a red LED when the temperature is above 70 degrees.  Your program should display the temperature on the serial monitor of the Arduino IDE. (If you want to do this option, see Prof. McLaughlin for a temperature sensor.)

Option 2. Create a nightlight that turns an LED on during darkness and off during ambient light.  Your program should display the ON vs. OFF status of the LED on the serial monitor of the Arduino IDE.

Option 3. Create a burglar alarm using an IR LED light-beam trip-wire. Create an audible tone and blinking LED when the light-beam is tripped, and display the message “Intruder Alert” on the serial monitor of the Arduino IDE.  Configure an input pin to allow the alarm to be shut off after it has been tripped.

What to submit: submit a  video demonstrating functionality of your system for problem 4.3. Be sure to include a piece of paper with your name hand-written on it in the background of your video.

 

License

Icon for the Creative Commons Attribution 4.0 International License

Applied Electrical Engineering Fundamentals by David J. McLaughlin is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book