An LED stoplight alarm for my Raspberry Pi. This is a node.js application that controls two LEDs wired up on my Raspberry Pi by turning them on or off at a configured time. See circuit diagram below for how I wired everything up.
Here is my circuit diagram that's required for running ledstoplight
.
Thanks to commander, you can see how to use ledstoplight
from the command-line using the --help
argument.
$ ./ledstoplight.js --help
Usage: ledstoplight [options]
LED stoplight. <time> must be in the local 24-hour format HH:MM.
Options:
-h, --help output usage information
-r, --red-on <time> The time the red LED should turn on. Defaults to: 19:00
-g, --green-on <time> The time the green LED should turn on (and also turn off red LED). Defaults to: 23:00
-o, --all-off <time> The time all LEDs should be turned off. Defaults to: 08:00
-i, --interval <n> Check every <n> seconds to see if an LED should turn on. Defaults to: 30