jonathanlundstrom / door-sensor-soundbox

Simple door opening sensor based on a Raspberry Pi and a magnetic switch.

Home Page:http://jonathanlundstrom.me/2017/02/27/door-sensor-raspberry-pi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Door Sensor Soundbox

This project aims to create a simple sound player which triggers whenever a door has been opened to play some fun introduction sounds. It's based on a Raspberry Pi, a magnetic switch and some other low-cost and accessible hardware pieces. Of course, anyone could go ahead and buy something mass produced, but it's always more fun to build stuff yourself.I got the idea a while back from seeing a YouTube video where this guy had created a custom door opening sensor that would play the iconic bass riffs from Seinfeld whenever the door opened. Seeing as how I love technology I figured it would make a good addition to my office, so I built an enhanced version. This is the resulting project.

This project was developed in partnership with Conrad in their efforts to showcase makers around Sweden. I would therefore like to thank them for providing the hardware used in this project. Please also check out their website for more interesting projects.

Usage

Clone the repository to a folder of your liking and use the following command to start the software:

python sensor.py

Build guide

Please refer to this link for a complete description on how and where to use this software.

http://jonathanlundstrom.me/2017/02/27/door-sensor-raspberry-pi

Supervisor job

If you wish to have the software running all the time, you can use Supervisor to accomplish this. This is the configuration file that I use. It should be placed in /etc/supervisor/conf.d and named sensor.conf or similar.

[program:sensor]
directory=/home/pi/Applications/DoorSensor
command=python sensor.py
autostart=true
autorestart=true
stderr_logfile=/var/log/sensor.err.log
stdout_logfile=/var/log/sensor.out.log

Finished product

This section will in time be updated with a video of the final build and product.

About

Simple door opening sensor based on a Raspberry Pi and a magnetic switch.

http://jonathanlundstrom.me/2017/02/27/door-sensor-raspberry-pi/


Languages

Language:Python 100.0%