https://github.com/marcl/halloweenpi
Halloween Raspberry Pi project for scaring my children
https://github.com/marcl/halloweenpi
Last synced: 3 months ago
JSON representation
Halloween Raspberry Pi project for scaring my children
- Host: GitHub
- URL: https://github.com/marcl/halloweenpi
- Owner: MarcL
- Created: 2015-10-27T21:20:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-03T15:34:01.000Z (about 9 years ago)
- Last Synced: 2025-06-12T16:09:48.241Z (7 months ago)
- Language: JavaScript
- Size: 3.3 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Halloween Raspberry Pi
A basic Node.js project to trigger sound effects via a Raspberry Pi. A quick project which allows the attachment of a button to the GPIO ports of the Pi and triggers random sound effects.
# Installation
Clone the project and install the node modules with:
`npm install`
You will need to ensure that the `alsa.h` header can be found in order to build the [node-speaker](https://github.com/TooTallNate/node-speaker) module. Do this with the following:
```
sudo apt-get install libasound2-dev
```
Once installed you can run the project with:
```
npm start
```
# Usage
The breadboard should be setup in a similar way as the [onoff module](https://www.npmjs.com/package/onoff). The button is attached to Gpio 4 and I've added 4 LEDs attached to GPIOs 14, 15, 18 and 23 for my project. These can be altered in `config/config.js` to your own needs and you will need to rewire your breadboard accordingly. Have a look at this very helpful [Raspberry Pi GPIO pinout](http://pi.gadgetoid.com/pinout) from [Gadgetoid](https://twitter.com/gagetoid) for more details.
The code will trigger all LEDs in the `leds` array in `config/config.js` to light when the sound effect is played. Alter the `soundFiles` array in `config/config.js` to add new sound effects to trigger. These are currently triggered randomly when the button is pressed.
Run the project with `npm start`.
# License
This project is licensed under the terms of the MIT license. See the LICENSE file.