Motionsensor
-
Hi guys,
I just build my first motionsensor but i think I have some problems. Everything is working and the sensors send 1 and 0 to my gateway, but my problem is that it looks like this in the serial monitor.
1 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 1 0 1 0The problem is that I get like 10 - 20 updates / second and as you see, its 1 and 0 at the same time and its pointed at a clean wall with no motions.
Anyone have any thoughts how to solve this?
Cheers
-
I had my PIR sensor triggering randomly until I powered it directly from the 5v power supply and not from the arduino 5V pin.
Also you may add a check to report only when status actually change, add a little delay on loop function or even better a sleep like this from the examples
// Sleep until interrupt comes in on motion sensor. Send update every two minute. sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME); -
I'm running the example sketch so the sleepfunction is allready there. So it's the 5V power that's the issue?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login