Read the statement by Michael Teeuw here.
LED Backlight for mirror - PIR to control them
-
So finally have been able to integrate the led lights :) Got the code working just now. However, will need sometime to make a proper module out of it. Tried out with johnnyfive and node-pixel with some luck…but it was hyperion/boblight that did the magic for me.
Of course, the trigger comes from Alexa/Echo rather than a PIR sensor. -
I did this.
I used the MMM-PIR-Sensor module and changed the following in node_helper.js:
From:
if (data.indexOf("0x120002") !== -1) exec("/opt/vc/bin/tvservice --preferred && chvt 6 && chvt 7", null);
To:
if (data.indexOf("0x120002") !== -1){ exec("/opt/vc/bin/tvservice --preferred && chvt 6 && chvt 7", null); exec("python /home/pi/py-spidev/RPi-LPD8806/LED.py"); }
and
From:
exec("/opt/vc/bin/tvservice -o", null);
To:
exec("/opt/vc/bin/tvservice -o", null); exec("python /home/pi/py-spidev/RPi-LPD8806/off.py"); }
Note that in the first from - to there is a “)” missing in the original code that you will need to fix. Also note that as soon as the module gets updated if you hack the code like I did above it will be wiped out when you update.
-
@orayoflighto NICE!!! What light strips did you use?
-
I used these only because they were incredibly cheap and I originally started out looking at MMM-PiLights which uses the same LPD8806 type:
https://www.amazon.com/gp/product/B01COEJST8/ref=oh_aui_detailpage_o09_s00?ie=UTF8&psc=1
I used this python code:
https://github.com/longjos/RPi-LPD8806 -
@orayoflighto VERY nice, Thank you!!!
You outta do a write up with instructions! MANY people would love this!
-
Just to add some depth to this… If you really want to go “crazy” with animations, I’m recommending Bibliopixel and PixelWeb. Then you can “animate” lot’s and trigger them with a curl “command”. Plus you get a nice Web-interface to test the animations in. :)
-
Oh lawd! This looks insanely good. Thanks alot for the guide. Out to go buy some strips today! :D
-
@Kimzer said in LED Backlight for mirror - PIR to control them:
Oh lawd! This looks insanely good. Thanks alot for the guide. Out to go buy some strips today! :D
To quote myself…
Can i use any sorts of led strips? Im looking to buy something from a store and not order online if possible.
Im in norway so if anyone knows something i could buy please let me know! -
Different strips have different ways they need to be programmed. Some have faster refresh rates than others.
Most people will suggest ADA102 for beginners. The strips I linked to are LPD8806. As I mentioned previously the only reason I bought those ones is that MMM-PiLights was programmed to use them.
-
Any stats etc on comparison between LPD, APA102, WS2812 and SK series. I find that WS2812B isn’t always able to render all colors properly.