La Fabrique DIY notification box
Branch: master
Clone or download
Latest commit e68c460 May 29, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore add gitignore Jun 16, 2016
LICENSE Create LICENSE May 29, 2017
README.md Update README.md Jun 16, 2016
applause.wav add special sound and audio files Jun 16, 2016
blop.wav add special sound and audio files Jun 16, 2016
notify.py add special sound and audio files Jun 16, 2016

README.md

notification-box

This is the python code used in this video :

https://www.youtube.com/watch?v=v2XymfjZn1k

If you want to run it.

Connect a wifi dongle, some rgb LEDS and a speaker to your raspberry pi.

Make sure you have git installed on your raspberry :

sudo apt-get install git

Clone the repo

git clone https://github.com/LucasBerbesson/notification-box.git

Go inside the notification folder

cd notification-box

Update the variables inside the file with your API credentials. You can use nano or vim to edit the file. You can also control the Refresh time of the box, the GPIO you want to use...

nano notify.py

Run the script

python notify.py

If the sound is too slow, maybe you shoud use the pygame mixer to display it. Place this code at the top of the file :

import pygame.mixer
from pygame.mixer import Sound
pygame.mixer.init(48000, -16, 1, 1024)
blop = pygame.mixer.Sound("blop.wav")
applause = pygame.mixer.Sound("applause.wav")

And replace

subprocess.call(["sudo", "omxplayer", "blop.wav"])

by

blop.play()