[Lab] Arduino LED Strip, PIR, and Relay
darcy at inventorartist.com
Fri Mar 2 15:41:33 EST 2018
You'll want to write this as "non-blocking". That means don't use delay.
Set up a variable to store the "lastMotionDetected". In your loop, every
time you detect motion, read the millis() clock into that variable. Every
time you write to the variable turn the light on. Also, monitor this
variable to see if 10 minutes has lapsed. Once it has lapsed, turn the
That'd be a start, does that help?
Art+ inventorArtist.com <http://inventorartist.com/> | Makerspace
hack613.com | Aviation rubber-power.com
Contact: *darcy at inventorArtist.com* <darcy at inventorArtist.com> |
613-563-3634 by appointment (no text)
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
> turns off 2 seconds after no motion.
> the code:
> pics of the project:
> I'm using the Grove Shield and Relay
> PS. I've not coding experience
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lab