38 lines
1.4 KiB
Markdown
38 lines
1.4 KiB
Markdown
|
# LED Annunciator
|
||
|
A quick and dirty little device to inform people you are on the phone or in an
|
||
|
appointment with a traffic light. The state information are generated by a
|
||
|
groupware or messaging application that writes a single letter code into a file.
|
||
|
|
||
|
| Command | Meaning |
|
||
|
|---------|---------------------------|
|
||
|
| a | Turn on all leds |
|
||
|
| 0 | Turn off all leds |
|
||
|
| r | Switch to the red line |
|
||
|
| g | Switch to the green line |
|
||
|
| y | Switch to the yellow line |
|
||
|
|
||
|
AnnunciatorServer takes the code and sends it via serial port to the device.
|
||
|
Alternatively, similar commands can be send by an infrared remote control.
|
||
|
|
||
|
## Hardware
|
||
|
An Arduino Nano with nine leds on pins D02 - D10. The leds are arranged in three
|
||
|
rows (red, yellow, green) of three leds each.
|
||
|
A YS1838B infrared receiver is connected to D11 and sits on top facing
|
||
|
backwards.
|
||
|
|
||
|
## Software
|
||
|
### led-annunciator
|
||
|
The Arduino code.
|
||
|
|
||
|
### checkLedPins
|
||
|
A program to check the led/pin mapping by turning them on one by one.
|
||
|
|
||
|
### annunciatorServer
|
||
|
The shell script that checks a commandfile and sends single-character
|
||
|
commands to the serial port.
|
||
|
This is useful when the commandfile needs to sit on a network share.
|
||
|
|
||
|
## Room for improvements
|
||
|
- Sometimes the ir receiver starts to send random codes
|
||
|
- As all leds are connected individually, many more commands can be defined.
|