<div dir="ltr">I think you need some non-blocking code in there.  The use of delay sits and waits and does not check the status of the motion detector while it is waiting.  So any time it is triggered, it should turn on the light and then "hang" before turning off the light and starting to check for motion again.<div><br></div><div>What I would do is use millis function.  Look at the blink without delay (non blocking code) for an example.  then anytime I saw montion I would change the counter to current millis + "on timer length"</div><div><br></div><div>Hope this helps.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 2, 2018 at 12:50 PM, Bruce Harding <span dir="ltr"><<a href="mailto:bsharding@rogers.com" target="_blank">bsharding@rogers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm trying to get the code for this project to work.  I want the LEDs to stay on<br>for 10 minute or continue on if more motion is detected. right now the LED strip<br clear="all"><div>turns off 2 seconds after no motion.<br><br>the code:<br><a href="https://gist.github.com/anonymous/8f0be0ffb6366ebe814c6d9b0ef7cd49" target="_blank">https://gist.github.com/<wbr>anonymous/<wbr>8f0be0ffb6366ebe814c6d9b0ef7cd<wbr>49</a><br><br>pics of the project: <br><a href="https://photos.app.goo.gl/QrgMDG1KMnpNUjdy2" target="_blank">https://photos.app.goo.gl/<wbr>QrgMDG1KMnpNUjdy2</a><br><br></div><div>I'm using the Grove Shield and Relay<br><a href="http://wiki.seeed.cc/Grove-Relay/" target="_blank">http://wiki.seeed.cc/Grove-<wbr>Relay/</a><br></div><div><br>PS. I've not coding experience<br><br><span>====</span><br><span></span><div class="m_-8707907899790980816gmail_signature"><div dir="ltr"><span>bruce<div><a href="http://faintfuzzies.ca" target="_blank">faintfuzzies.ca</a></div></span></div></div>
</div></div>
<br>______________________________<wbr>_________________<br>
Lab mailing list<br>
1. subscribe <a href="https://artengine.ca/mailman/listinfo/lab" rel="noreferrer" target="_blank">https://artengine.ca/mailman/<wbr>listinfo/lab</a><br>
2. then email <a href="mailto:Lab@artengine.ca">Lab@artengine.ca</a> to send your message to the list<br></blockquote></div><br></div>