Table of Contents generated with DocToc
Node.js app (along with some suplementary sound files) to control few LEDs and play said sound files. Primary application: to make a Halloween pumpkin scarier! >:>
Clone the repo:
git clone https://github.com/VipSaran/pimpkin.git
cd pimpkin
GPIO pins used to control the LEDS:
var gpioPin1 = 18; // header pin 18 = GPIO port 24
var gpioPin2 = 22; // header pin 22 = GPIO port 25
Various timings:
var interval = 100; // blinking interval (in ms)
var pause = 5000; // delay (in ms) between consecutive scareThem (after the sound has finished)
var duration = 300000; // duration of the "show" (in ms)
Want to randomly play the sound files? Change the default:
var soundOrderRandom = false;
My Pi had a really low audio output volume when I started testing the sound files. This is how you can easily configure it in shell:
alsamixer
Run the app:
node blink.js
Sorry. The code should speak for itself (and it should be a short speech).