today’s goals:
- add a green LED to your Circuit Builder program.
- show Mr. Milstead your working stoplight program
- move on to Part 2 and Part 3 to build your stoplight circuit and program in real life using your Arduino and breadboard.
Part 1: your assignment is to add to your current circuit so that it works like a standard stoplight. Here’s what you need to do in Tinkercad circuit builder:
- Add your name to the first line of your program with a comment. Like this: //Rod Milstead. Put two slashes in front of your name like this //Rod Milstead
- add a green LED, wiring and resistor to your circuit.
- connect this green LED to pin 11.
- add a variable to your program for the green LED.
- add code to your program so that it works like this:
- Green LED on for two seconds (2000 milliseconds). All other LEDs off.
- Green LED off and yellow LED on for half a second (500 milliseconds).
- Yellow LED off and Red LED on for one second.
After you have completed and tested your program SHOW ME your working program for credit. Then move on to Part 2.
Part 2: Build a physical circuit that is a real world example of your stoplight circuit. You will start with your Arduino and breadboard.
Part 3: Search your computer for the Arduino program. Copy and paste your program from Tinkercad Circuit builder into the Arduino program. Upload your stoplight program into your Arduino and test it.