User Tools

Site Tools


Traffic Lights

Coding a Traffic Light simulator is a excellent educational project

You can start off by just creating one traffic light

Once that has been achieved, you can go onto extra tasks such as turning it into a pedestrian crossing simulator and adding a red/green person (or walk/dont walk) light

Then a button can be added - then a wait light - and beeping sound etc

Further development can be added by simulating a person crossing a road and even have cars driving around responding to the signals

It is a classic low barrier for entry - high ceiling project


Better Method

The version above contains the least blocks necessary to simulate a traffic light but isn't necessarily the best way to go about it.

By adding in some broadcast blocks, the program becomes easier to understand and easier to debug if a mistake is made

starting/examples/trafficlights.txt · Last modified: 2017/10/04 10:29 by simplesi