Mailbox Sensor
-
you can debounce an interrupt:
void PushButton() //interrupt. { static unsigned long last_interrupt_time = 0; unsigned long interrupt_time = millis(); if (interrupt_time - last_interrupt_time > 200) // If interrupts come faster than 200ms, assume it's a bounce and ignore { counter++;// your interrupt flag here } last_interrupt_time = interrupt_time; }@BulldogLowell yes tjis is time debouncing as opposed to the debouncing library from tje switch sketch
-
@BulldogLowell yes tjis is time debouncing as opposed to the debouncing library from tje switch sketch
right, yes.
-
A silly question - wouldn't PIR be the best option here? very responsive and interrupt driven so low power consumption? or am I missing something?
-
A silly question - wouldn't PIR be the best option here? very responsive and interrupt driven so low power consumption? or am I missing something?
The PIR is a light sensor, so they are quite similar. The light sensor works for me, and I did try it with a motion sensor too. I'm not hung up on either but I can't say what is best.
Try it with the motion and let us know how it goes for you!
-
The PIR is a light sensor, so they are quite similar. The light sensor works for me, and I did try it with a motion sensor too. I'm not hung up on either but I can't say what is best.
Try it with the motion and let us know how it goes for you!
@BulldogLowell will do! that is one of my next projects. wouldn't PIR be easier to mount, as you can mount it at the back or at the top of the compartment? not trying to criticize, I am pretty much a newbie and trying to see if I miss anything.
-
@BulldogLowell will do! that is one of my next projects. wouldn't PIR be easier to mount, as you can mount it at the back or at the top of the compartment? not trying to criticize, I am pretty much a newbie and trying to see if I miss anything.
I'm sure you PIR will work well... if you look at the box I built, I didn't have a mounting problem.
Likewise I tried a mechanical switch, but didn't like what happened if the door wasn't closed all the way and I wanted to be able to get the 'module' in and out as I tested it.
The PIR was similarly an issue for me, if the box wasn't closed it would constantly send messages (changes in light from sun's position, car/person walking by, etc) during the day. so if you trust your letter carrier... :wink:
it is easy to try your idea; for me that is part of the fun of the world of electronics. And open-source is what makes reasonably well-crafted ideas into even better ideas!
-
I'm sure you PIR will work well... if you look at the box I built, I didn't have a mounting problem.
Likewise I tried a mechanical switch, but didn't like what happened if the door wasn't closed all the way and I wanted to be able to get the 'module' in and out as I tested it.
The PIR was similarly an issue for me, if the box wasn't closed it would constantly send messages (changes in light from sun's position, car/person walking by, etc) during the day. so if you trust your letter carrier... :wink:
it is easy to try your idea; for me that is part of the fun of the world of electronics. And open-source is what makes reasonably well-crafted ideas into even better ideas!
@BulldogLowell our mailboxes have slots, not door so there is no problem or door being left open. will try it the minute i'll get my hands on some more dupont cables!!!!
-
@BulldogLowell our mailboxes have slots, not door so there is no problem or door being left open. will try it the minute i'll get my hands on some more dupont cables!!!!
@Moshe-Livne said:
will try it the minute i'll get my hands on some more dupont cables!!!!
:thumbsup:
-
Hi,I think you have done a good job.I am very interested in your IOS app, it's written by yourself or other open-source project? Thanks.
I am using HomeWave, an iOS app developed for Vera which is my controller.