===================================================Sample output from Demo 1 (continued)=================================================== Would you like to redo the photoresistor calibration and repeat this light sensor demonstration? If so, press the pushbutton TWICE in a row (the 2
nd press must occur within 3 seconds of the 1
st press). Otherwise, press the button only once, then wait 3 seconds.
Button press count = 1
Exiting light sensor demo.
(Press my pushbutton to continue)
In this next demonstration, I'm going to be using an RGB (Red/Green/Blue) LED. This means that a single LED case has all three of these LED colors built right in, as separate LEDs, but all in the same plastic case. You can turn them on one at a time, or all at once, or whatever you want. Additionally, using the analogWrite() command in Arduino, you can send a PWM (Pulse Width Modulation) signal to an LED to vary its brightness, or intensity. Therefore, using one RGB LED you can mix different intensities of colored light and generate ANY color of the rainbow. Let's see this in action!
(Press my pushbutton to see the red LED turn on).
(Now press my pushbutton to see only the green LED on).
(Now press my pushbutton to see only the blue LED on).
(Now press my pushbutton to see both the RED AND GREEN LED on. This makes Yellow. Practice on your own later to write code to make the RGB LED turn yellow, cyan and magenta).
Now press my pushbutton to see the RGB LED go through the whole rainbow, fading in and out of all of the colors! Press the pushbutton again to stop this demo and continue on.
Rainbow ON.
The color progression is RED à (YELLOW) à GREEN à (CYAN) à BLUE à (MAGENTA) à RED
Rainbow OFF
Whew! Is it hot in here or just me? J My microprocessor seems to be getting all worked up over the excitement of all the cool things I can do! Let's check the room temp. w/my TMP36 analog temperature sensor (thermometer). Gently squeeze the sensor w/your fingers to watch the temp. rise!
(Press my pushbutton to continue; press and HOLD it to stop)
Thermometer ON.
Room temp = 23.80 deg C, or 74.84 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.78 deg C, or 76.60 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Room temp = 24.29 deg C, or 75.72 deg F.
Thermometer OFF.
Cool stuff, let's keep going!
(Press the pushbutton to continue).
Skipping really cool servo (ex: robotic arm type actuator) demo since there are too many demos to fit on the Arduino all at one time. Compile & run the other main demo code to see any skipped demos!
We are on the final demo! I feel like we've really come close these past several minutes, you know, as we've learned together, so what do you say I serenade you with some of my favorite classical music, using my piezo buzzer?
There is no interaction required from you on this one; all you have to do is listen. When the song is over, it will end automatically. Can you guess which song it might be? PS. Before the music plays, I will do some sounds sweeps, fast, then slow, to demonstrate the range of notes I can play.
(Press the pushbutton to continue)
soundSweepFast START (To me, this sounds like the sound they make in cartoons when a character slips on a banana
soundSweepFast END
soundSweepSlow START
soundSweepSlow END
serenadeYouWithBeautifulMusic START
serenadeYouWithBeautifulMusic END
Before you go, let me give you a proper introduction: I am an Arduino microcontroller development platform. There are many types of Arduinos. My type is called "Leonardo". I am based on an Atmel ATmega32U4 microcontroller. Today, in these demos, you have seen only a *tiny* sample of what I can do. I can do ANYTHING you tell me to do. ANYTHING you program me to do. I can change the world. I can change the way we live, but only if YOU make me do so. Your students can change the world, they can learn and grow and CREATE, and make it a better place, but only if YOU help them learn to do so. Let's all *strive* to improve ourselves, and remember that it is US who make up the world, and it is US who determine the destiny of the world. Let us use our time wisely, share our talents with each other, and become THINKERS *AND* DOERS, not just HEARERS. "Be a thinker, and be a doer." That is my motto.
Sincerely,
Gabriel Staples
END OF DEMO.
Thanks for your time, Gabriel J.
This program was created by Gabriel Staples (
http://ElectricRCAircraftGuy.blogspot.com/), June 2014.
I'm still watching you…J Saving file, please wait…
File Saved
NEXT, GET HELP FROM THE INSTRUCTOR TO UPLOAD THE DEMO2 CODE AND BEGIN AGAIN TO SEE THE SKIPPED DEMOS.