<div dir="ltr"><div>Dave,<br><br>I figure out why the delay wasn't working. A stupid error. I've looked at the millis thing and the blink without delay code, but I'm such a beginner I'm not sure how to take what I'm using and convert it to use millis.<br><br>====<br></div>bruce <br></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 March 2018 at 14:28, Dave Hunt <span dir="ltr"><<a href="mailto:dave@huntgang.com" target="_blank">dave@huntgang.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 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/anonym<wbr>ous/8f0be0ffb6366ebe814c6d9b0e<wbr>f7cd49</a><br><br>pics of the project: <br><a href="https://photos.app.goo.gl/QrgMDG1KMnpNUjdy2" target="_blank">https://photos.app.goo.gl/QrgM<wbr>DG1KMnpNUjdy2</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-Rel<wbr>ay/</a><br></div><div><br>PS. I've not coding experience<br><br><span>====</span><br><span></span><div class="m_4293813679886981577m_-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/l<wbr>istinfo/lab</a><br>
2. then email <a href="mailto:Lab@artengine.ca" target="_blank">Lab@artengine.ca</a> to send your message to the list<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span>====<br>bruce<div><a href="http://faintfuzzies.ca" target="_blank">faintfuzzies.ca</a></div></span></div></div>
</div>