Arduino - Project 1 - 1 LED Light "Hello WOrld"
Follow the directions to program the Arduino Uno Microcontroller to flash one LED light on and off. Have your Arduino out and ready with the USB cord. Connect the USB cord to your laptop. Launch Modkit. Modkit should recognize your Arduino. Ask for assistance if it does not recognize your board.
Read the information on slide one. Notice the section in yellow. This is the actual code that you would learn to type. We will be using this for comparing what we do with the programing blocks. Please remember the terms like; pin, led pin, High, Low, digital write and delay.
Pin - referes to the pin that you will plug in to on the board. Notice in the picture that the Arduino has pins numbered 0-13 on one side. These are the digital pins. For project 1, we will be using pin 13.
Void Loop - means that you are telling the Arduino to loop or repeat the instructions over and over again.
digital write - is telling the Arduino to send a signal to a certain pin.
High - means you are telling the Arduino that the signal will be ON.
Low - means that you are telling the Arduino that the signal will be OFF.
Delay - means that you are telling the Arduino how long it should stay ON or OFF.
**
1. Place an LED light with the shorter leg in pin labeled GND and longer leg in 13. GND means ground. (see slide 2)
2. Make sure Modkit is on and your board has been recognized. (see slide 3)
3. Switch your modkit screen to blocks. (see slide 4)
4. Copy the block configuration from slide 5 by dragging blocks on to the screen and connecting them. (see slide 5)
5. After you have them exactly like slide 5, click on the play button, wait for the Arduino to load the program and then see if the led light flashes on and off for one second.
6. If it works, click on the stop button. Then click on the code mode at the top so you can see the code. How does it compare with slide 1?
7. Move on to Project 2.
Read the information on slide one. Notice the section in yellow. This is the actual code that you would learn to type. We will be using this for comparing what we do with the programing blocks. Please remember the terms like; pin, led pin, High, Low, digital write and delay.
Pin - referes to the pin that you will plug in to on the board. Notice in the picture that the Arduino has pins numbered 0-13 on one side. These are the digital pins. For project 1, we will be using pin 13.
Void Loop - means that you are telling the Arduino to loop or repeat the instructions over and over again.
digital write - is telling the Arduino to send a signal to a certain pin.
High - means you are telling the Arduino that the signal will be ON.
Low - means that you are telling the Arduino that the signal will be OFF.
Delay - means that you are telling the Arduino how long it should stay ON or OFF.
**
1. Place an LED light with the shorter leg in pin labeled GND and longer leg in 13. GND means ground. (see slide 2)
2. Make sure Modkit is on and your board has been recognized. (see slide 3)
3. Switch your modkit screen to blocks. (see slide 4)
4. Copy the block configuration from slide 5 by dragging blocks on to the screen and connecting them. (see slide 5)
5. After you have them exactly like slide 5, click on the play button, wait for the Arduino to load the program and then see if the led light flashes on and off for one second.
6. If it works, click on the stop button. Then click on the code mode at the top so you can see the code. How does it compare with slide 1?
7. Move on to Project 2.
Here is a different setup. An LED usually uses 2-3 volts. When connecting an LED directly to the pin without a resister it receives a full 5 volts. This can lead to the LED eventually burning out. So we use a resistor to reduce the power going to the LED. This activity will also get you started using the breadboard, jumper wires and resistors.
1. Wire up the Arduino according to the diagram (sometimes called Fritzing).
2. Start up the Modkit application and make sure the board is detected.
3. Make sure you are in blocks mode.
4. Look at the project code on slide 4 and read it carefully. Understand what pins are going to be used. It is very similar to project 1.
5. Use the same block configuration as in projects 1. The only difference will be in the pin selected. (See slide 6)
6. Upload the program to the Arduino board and see if it works. Stop the program when you know it worked correctly.
7. Look again in code mode (slide 7) to see how the code compares to slide 3.
8. Move on to project 3.
1. Wire up the Arduino according to the diagram (sometimes called Fritzing).
2. Start up the Modkit application and make sure the board is detected.
3. Make sure you are in blocks mode.
4. Look at the project code on slide 4 and read it carefully. Understand what pins are going to be used. It is very similar to project 1.
5. Use the same block configuration as in projects 1. The only difference will be in the pin selected. (See slide 6)
6. Upload the program to the Arduino board and see if it works. Stop the program when you know it worked correctly.
7. Look again in code mode (slide 7) to see how the code compares to slide 3.
8. Move on to project 3.
Arduino - Project 2 - 1 LED w/resistor & Breadboard
Arduino - Project 3 - 3 LED Light Display
Arduino LED Project 4 - Robot Eye
Arduino LED Project 5 - Push Button (Introducing the "If Else" statement.)
In this project you will learn that the "if else" statement will let you do conditional commands. If you meet one condition then another condition will occur. This is similar to the "if then" statements of other programming or coding languages. Here you will tell the Arduino, if the button is pushed, else (then) turn on the light.
LED Button Delay Project 6
Arduino Project 7 - RGB (red-green-blue) LED light
Arduino Project 8 - Mood Detector with RGB LED w/TMP36 temperature sensor
Follow the wiring directions below to create a Mood Detector. Then copy the code and upload to the Arduino.
Later add additional colors by duplicating an "else if " statement several times and changing the color for each. (refer to chart for colors). Notice how the inequality or comparison operators <= (less than or equal to) show that anything below a specific number triggers the color change.
Be sure to calibrate the temperature that you want each change to occur by observing how the temperature changes in the serial monitor. Be sure to open the serial monitor located in the tools menu so you can see the temperature changes as you touch the sensor. Change the settings if you need to. Then make a key or chart that describes color and mood.
Extend: You could extend this by adding beeps after each color change. By adding a variation of buzzer project #1 you could add different amounts of beeps each time a color change occurs with the temperature increase.
Engineering & Design Challenge: Create an enclosure or case that would hide the Arduino, Breadboard and Wires, but show the RGB LED and the Temp36 sensor.
Later add additional colors by duplicating an "else if " statement several times and changing the color for each. (refer to chart for colors). Notice how the inequality or comparison operators <= (less than or equal to) show that anything below a specific number triggers the color change.
Be sure to calibrate the temperature that you want each change to occur by observing how the temperature changes in the serial monitor. Be sure to open the serial monitor located in the tools menu so you can see the temperature changes as you touch the sensor. Change the settings if you need to. Then make a key or chart that describes color and mood.
Extend: You could extend this by adding beeps after each color change. By adding a variation of buzzer project #1 you could add different amounts of beeps each time a color change occurs with the temperature increase.
Engineering & Design Challenge: Create an enclosure or case that would hide the Arduino, Breadboard and Wires, but show the RGB LED and the Temp36 sensor.