The objective of this project is to realize a traffic light following these steps:
– The red led lights for 3 seconds by displaying on the LCD display «Stop».
– After 3 seconds the red led goes out and lights another green, also for 3 seconds, displaying “Cross”
– Once the green led goes out, lights a third, orange, for 2 seconds by displaying “Cross fast”.
Then the program resumes in loop .
To make the assembly you can connect: LEDs:
For the LCD display:
The mounting methods are numerous and here are some examples:
Here is the traffic light makecode program.
Note: you have to go to Extensions and import the I2C_LCD1602 extension.