project inspired by pi-blaster and based on pigpio libary (http://abyz.co.uk/rpi/pigpio/) which uses a mix between hw and sw pwm.
the goal is to create a universal code in which you write settings and so on in FIFO style (just like pi-blaster). the following things are on our toDo-list:
- assign pins to led colors (i.e. 17 = blue led)
- enter desired fade mode (linear, exp., no fade)
- enter target brigthness for each led/for all rgbw leds (the program will then fade according to the fade mode
- option to connect a sound sensor
- some additional modes like continious fade to random color w/ defined speed etc.
- an alarm clock which fades on all/some leds slowly at a given time (sunrise simulation to wake up easily) (in coordination with some PHP code...)
- more to come...
echo them into /dev/led-blaster
e.g. echo w=1000 > /dev/led-blaster
-
RGBW brightnesses:
r = value //set redBrightness to value 0...RANGE
g = value //set greenBrightness to value 0...RANGE
b = value //set blueBrightness to value 0...RANGE
w = value //set whiteBrightness to value 0...RANGE -
modes: mode = value //choose mode obviously
options:
mode0 = fade to fixed brightness
mode1 = fade to random colors -
time: time = value select the time (in ms) needed until fade is completed
- create a new folder:
sudo mkdir /opt/led-blaster
- move the downloaded binaries to this folder
mv led-blaster-pre /opt/led-blaster
- now find the DAEMON_INITFILE from the source code .zip and do the following
sudo mv DAEMON_INITFILE /etc/init.d/led-blaster #move initfile
sudo chmod +x /etc/init.d/led-blaster #make it executable
sudo update-rc.d led-blaster defaults #update
You have successfully added led-blaster to your autostart!
led-blaster needs the pigpio libary
to install it, go to your home directory with cd
(or wherever you want to install it) and run:
wget abyz.co.uk/rpi/pigpio/pigpio.zip
unzip pigpio.zip
cd PIGPIO
make
sudo make install
led-blaster assumes you have a webeserver running and the led-smarthome php files stored there. e.g. the information which pins are actually used is stored there. so please install the webserver and led-smarthome first. ##Install led-blaster we recommend to install led-blaster at /opt/led-blaster. therefore you have to go to /opt via
cd /opt
then clone this repository (run with sudo if necessary)
git clone https://github.com/smart-led-suite/led-blaster
now into the led-blaster folder and compile the program:
cd led-blaster/
make
now the program is ready. in order to run it everytime your pi boots,just do the following:
sudo mv DAEMON_INITFILE /etc/init.d/led-blaster #move initfile
sudo chmod +x /etc/init.d/led-blaster #make it executable
sudo update-rc.d led-blaster defaults #update
now reboot your pi and check with
ps -C led-blaster-pre
if led-blaster ist actually running.
if you delete /etc/init.d/led-blaster
led-blaster is removed from autostart. you can then remove all the files and uninstall the pigpio_libary
you can configure led-blaster in various ways:
- the global config file:
- open the config file at /etc/led-blaster.ledconfig (e.g.
sudo nano /etc/led-blaster.ledconfig
) - you have to set the serverPath to the directory where you've installed led-smarthome
- edit the values then restart led-blaster / reboot your pi.
- configuration via led-smarthome
- visit [your_pis_ip_adress]/configuration.php
- change the pin and the colorinformation etc. of the leds.
- NOTE: changes to the pins only apply AFTER REBOOT.