Light Traffic
source: Light Traffic
Manual Light Traffic...
I thought that I would use the RGB LED and the LCD screen because my use of them during the diploma was very little, so the most appropriate choice was to make a traffic light with the case printed on screen.
We design the desired circuit on Fritzing to keep the components safe and make sure that the electronic circuit is built correctly.
We implemented the desired circuit on Breadboard after simulated it on software.
Defining the inputs in global scope including LCD libraries and defining it. Starting serial monitor.
Setting RGP LED pins as output.
Starting LCD.
If there is something sent via Bluetooth print and store it in input.
If the input is "r":
Turn the RGB to red and print " STOP " on LCD
if the input is "y":
Turn the RGB to yellow and print "WAIT" on LCD
If the input is "g":
Turn the RGB to green and print "GO" on lcd
I should've added lcd.clear();
to clear the LCD
I was not sure of the values of the resistors to be used...
After I checked the values after going back to the videos, I found that the had run out and I had to go buy more.
I used the voltage Divider Calculator to try to know which resistors I can use.
>> Voltage Divider Calculator