[Lab] Arduino LED Strip, PIR, and Relay

Bruce Harding bsharding at rogers.com
Fri Mar 2 14:56:44 EST 2018


Dave,

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.

====
bruce

On 2 March 2018 at 14:28, Dave Hunt <dave at huntgang.com> wrote:

> 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.
>
> 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"
>
> Hope this helps.
>
> On Fri, Mar 2, 2018 at 12:50 PM, Bruce Harding <bsharding at rogers.com>
> wrote:
>
>> I'm trying to get the code for this project to work.  I want the LEDs to
>> stay on
>> for 10 minute or continue on if more motion is detected. right now the
>> LED strip
>> turns off 2 seconds after no motion.
>>
>> the code:
>> https://gist.github.com/anonymous/8f0be0ffb6366ebe814c6d9b0ef7cd49
>>
>> pics of the project:
>> https://photos.app.goo.gl/QrgMDG1KMnpNUjdy2
>>
>> I'm using the Grove Shield and Relay
>> http://wiki.seeed.cc/Grove-Relay/
>>
>> PS. I've not coding experience
>>
>> ====
>> bruce
>> faintfuzzies.ca
>>
>> _______________________________________________
>> Lab mailing list
>> 1. subscribe https://artengine.ca/mailman/listinfo/lab
>> 2. then email Lab at artengine.ca to send your message to the list
>>
>
>


-- 
====
bruce
faintfuzzies.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://artengine.ca/pipermail/lab/attachments/20180302/9e9326d9/attachment.html>


More information about the Lab mailing list