Summary:
1. read all the directions.
2. program four LEDs to blink based on the directions.
3. comment four lines of code to explain your understanding.
4. turn your own program in on Canvas.
Together, we setup a breadboard and Arduino to run the basic LED blink code. Then we connected an LED and resistor to the breadboard and Arduino.
Video tutorial: Click here to review setting up and programming one blinking LED.
Now the next move is to add more LEDs. By the time your have completed this work you will have three LEDs that will blink in sequence: red, yellow, green (or whatever colors you want).
- login to tinkercad.com, go to the Circuit Builder and open your blink circuit.
- you should have one red LED connected and working.
- now add a yellow, a green LED and a blue LED next to the red LED so that your breadboard looks like this:
- go to the Code Editor. Change your existing code so that the each lights turns on and off before the next one. Like this:
all lights off
red LED on
red LED off
yellow LED on
yellow LED off
green LED on
green LED off
blue LED on
blue LED off - put your name on the first line of your program as a comment. Like this: //Rod Milstead but use your name.
- use comments on four lines of code to explain, in your own words, what is happening on that line of code.
- follow this link to learn how to rename your program AND share from Tinkercad.
- Sample code for ONE LED to get you started: