<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Request for help: LED Control module for and 5050smd strip]]></title><description><![CDATA[<p dir="auto">I am looking for some help with a problem I’ve been trying to wrap my head around for about 4 month now. I have a 5m length of analogue LED strip (smd5050) that I want to attach surrounding my mirror providing lighting for the missus to be able to do her makeup etc. I have already prepped a circuit board using mosfets to control the strip as done in this tutorial <a href="https://dordnung.de/raspberrypi-ledstrip/" target="_blank" rel="noopener noreferrer nofollow ugc">https://dordnung.de/raspberrypi-ledstrip/</a>. I’m however stuck on the software side, I haven’t done much JavaScript in some time and even then my knowledge was very basic. I’m looking to create a module with a) a button for on and off, b) a timer that can be set in config to auto turn off light if left on c) three vertical sliders to control the individual rub values of the strip. I know it’s pretty specific, I’m looking for some direction on how to achieve these things especially in regards to the sliders. Thanks in advance.</p>
]]></description><link>https://forum.magicmirror.builders/topic/6791/request-for-help-led-control-module-for-and-5050smd-strip</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 03:24:11 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/6791.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Mar 2018 10:13:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Request for help: LED Control module for and 5050smd strip on Fri, 19 Apr 2019 20:02:14 GMT]]></title><description><![CDATA[<p dir="auto">habe alles nach anleitung verkabelt… die pins geändert vom pir …<br />
habe pigpio installiert und rebootet<br />
der pir reagiert auch aber bildschirm bleibt grau… dh ohne bild… monitor ist aber an.<br />
led streifen leuchtet aber nicht…</p>
<p dir="auto">was kann das sein<br />
thx</p>
]]></description><link>https://forum.magicmirror.builders/post/56197</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/56197</guid><dc:creator><![CDATA[metalldetector]]></dc:creator><pubDate>Fri, 19 Apr 2019 20:02:14 GMT</pubDate></item><item><title><![CDATA[Reply to Request for help: LED Control module for and 5050smd strip on Thu, 22 Mar 2018 07:03:14 GMT]]></title><description><![CDATA[<p dir="auto">So I’ve found another possibility to do everything I need, I found a website showing me how to setup a secondary web server to control the led strip, I’ve modified it to my specifications but I’m stuck on how to implement it into my mirror. I am able to view the webpage via my pi’s ip and port however the webpage won’t seem to work in an iframe module as I had hoped.</p>
]]></description><link>https://forum.magicmirror.builders/post/37294</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37294</guid><dc:creator><![CDATA[disease]]></dc:creator><pubDate>Thu, 22 Mar 2018 07:03:14 GMT</pubDate></item><item><title><![CDATA[Reply to Request for help: LED Control module for and 5050smd strip on Mon, 19 Mar 2018 10:16:14 GMT]]></title><description><![CDATA[<p dir="auto">That kind of does what I want in a round about way, I do want the sliders though as I do want to be able to control the colour, I do there is a python script which does just this from a book entitled “Programming the raspberry pi” the author has a github which has open access to the script. Essentially the script opens up a Tkinter window with sliders for each colour. Would it be possible to incorporate the sliders into a module, I’m a little fuzzy on how the modules work if they are entirely JavaScript or if HTML is possible?</p>
]]></description><link>https://forum.magicmirror.builders/post/37192</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37192</guid><dc:creator><![CDATA[disease]]></dc:creator><pubDate>Mon, 19 Mar 2018 10:16:14 GMT</pubDate></item><item><title><![CDATA[Reply to Request for help: LED Control module for and 5050smd strip on Sun, 18 Mar 2018 12:45:45 GMT]]></title><description><![CDATA[<p dir="auto">Hey mate,</p>
<p dir="auto">here u can see my result: <a href="https://forum.magicmirror.builders/topic/6048/my-first-mirror-until-now/2">https://forum.magicmirror.builders/topic/6048/my-first-mirror-until-now/2</a></p>
<p dir="auto">i used this tutorial: <a href="https://dordnung.de/raspberrypi-ledstrip/" target="_blank" rel="noopener noreferrer nofollow ugc">https://dordnung.de/raspberrypi-ledstrip/</a></p>
<p dir="auto">its not a module for MM. But you can use Pigpio with an external script.<br />
Just use the PIR or a button to turn on and off the lights.</p>
<p dir="auto">in my case the PIR starts a script where it turns on the monitor and turn on the mosfets slowly.</p>
<p dir="auto">For the PIR i used this:</p>
<pre><code>#!/usr/bin/env python

import sys
import time
import RPi.GPIO as io
import subprocess
import pigpio

io.setmode(io.BCM)
SHUTOFF_DELAY = 119 # seconds
PIR_PIN = 25       # 22 on the board
LED_PIN = 16

def main():
    io.setup(PIR_PIN, io.IN)
    io.setup(LED_PIN, io.OUT)
    turned_off = False
    last_motion_time = time.time()

    while True:
        if io.input(PIR_PIN):
            last_motion_time = time.time()
            io.output(LED_PIN, io.LOW)
            print ".",
            sys.stdout.flush()
            if turned_off:
                turned_off = False
                turn_on()
        else:
            if not turned_off and time.time() &gt; (last_motion_time +
                                                 SHUTOFF_DELAY):
                turned_off = True
                turn_off()
            if not turned_off and time.time() &gt; (last_motion_time + 1):
                io.output(LED_PIN, io.HIGH)
        time.sleep(.1)

def turn_on():
        subprocess.call("sh /home/pi/lights_on.sh", shell=True)

def turn_off():
        subprocess.call("sh /home/pi/lights_off.sh", shell=True)

if __name__ == '__main__':
    try:
        main()
    except KeyboardInterrupt:
        io.cleanup()
</code></pre>
<p dir="auto">And the script (lights_on and lights_off) which will be executed by detection looks like this:</p>
<p dir="auto">lights_on:</p>
<pre><code>sudo tvservice -p

sleep 0.02

pigs p 17 1
pigs p 22 1
pigs p 24 1

sleep 0.06s

pigs p 17 2
pigs p 22 2
pigs p 24 2

sleep 0.06s

pigs p 17 3
pigs p 22 3
pigs p 24 3

sleep 0.06s

pigs p 17 4
pigs p 22 4
pigs p 24 4

sleep 0.06s

pigs p 17 5
pigs p 22 5
pigs p 24 5

sleep 0.06s

pigs p 17 6
pigs p 22 6
pigs p 24 5

sleep 0.06s

pigs p 17 7
pigs p 22 7
pigs p 24 6

sleep 0.06s

pigs p 17 8
pigs p 22 8
pigs p 24 7

sleep 0.06s

pigs p 17 9
pigs p 22 9
pigs p 24 8

sleep 0.06s

pigs p 17 10
pigs p 22 10
pigs p 24 9

sleep 0.06s

pigs p 17 11
pigs p 22 11
pigs p 24 10

sleep 0.06s

pigs p 17 12
pigs p 22 12
pigs p 24 11
</code></pre>
<p dir="auto">lights_off:</p>
<pre><code>pigs p 17 12
pigs p 22 12
pigs p 24 11

sleep 0.06s

pigs p 17 11
pigs p 22 11
pigs p 24 10

sleep 0.06s

pigs p 17 10
pigs p 22 10
pigs p 24 9

sleep 0.06s

pigs p 17 9
pigs p 22 9
pigs p 24 8

sleep 0.06s

pigs p 17 8
pigs p 22 8
pigs p 24 7

sleep 0.06s

pigs p 17 7
pigs p 22 7
pigs p 24 6

sleep 0.06s

pigs p 17 6
pigs p 22 6
pigs p 24 5

sleep 0.06s

pigs p 17 5
pigs p 22 5
pigs p 24 5

sleep 0.06s

pigs p 17 4
pigs p 22 4
pigs p 24 4

sleep 0.06s

pigs p 17 4
pigs p 22 4
pigs p 24 4

sleep 0.06s

sudo tvservice -o
pigs p 17 3
pigs p 22 3
pigs p 24 3

sleep 0.06s

pigs p 17 2
pigs p 22 2
pigs p 24 2

sleep 0.06s

pigs p 17 1
pigs p 22 1
pigs p 24 1

sleep 0.06s

pigs p 17 0
pigs p 22 0
pigs p 24 0

</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/37160</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/37160</guid><dc:creator><![CDATA[cruunnerr]]></dc:creator><pubDate>Sun, 18 Mar 2018 12:45:45 GMT</pubDate></item></channel></rss>