Project:Mini Traffic Lights

From London Hackspace Wiki
Jump to navigation Jump to search
Mini Traffic Lights
Created 19/03/2012
Members asc
QR code

Mini Traffic Lights - Asc

Some computer controlled traffic lights! Inspired by TomW's TrafficLights

Controllable via serial port commands, no drivers, no shenanigans. If your script/program can access the serial port it can blink blink the lights.


  • Small
  • Cheap
  • Easy to build
  • Looks good
  • Can be easily interfaced with a computer so that the computer can control it via pretty much any programming or scripting language.


  • Minimus
  • Laser cut case
  • 3mm MDF / acrylic
  • 2 x 12mm M3
  • 2 x M3 nut
  • Wire
  • 8mm kite Tube
  • 6 x 5mm leds (2 x red, 2 x orange, 2 x green)
  • 6 x 5mm led bezels
  • 6 x 330 Ohm resisters
  • Superglue

Microcontroller Code

<to be released>

Example Computer Code

<to be released>

Linux uDev Non-root User Magic

<to be released>

Operating System Specific

Firstly make sure minicom is installed.  "sudo apt-get install minicom" or "sudo yum install minicom"
ls -latr /dev/|grep -i tty  (it will typically be dev/ttyACM*) 
vim ~/.minirc.dfl
 pu port             /dev/ttyACM0
 pu baudrate         38400
 pu minit
 pu mreset
This will setup minicom with the correct settings.  Change /dev/ttyACM0 to whatever was discovered in dmesg.
ls -latr /dev/|grep -i tty  (it will typically be dev/ttys0.usbmodem*) 
screen /dev/ttys0.usbmodem1234 38400   (by default it sets 8N1)
to exit the terminal: Ctrl-A Ctrl-K Y <enter>
The easiest way is to use putty and connect to the specific comport which can be discovered in Device Manager.  Have it set to 38400 8N1


Windows Drivers MCU binary flash