author
1Instructables51,473Views10Comments

Tell us about yourself!

Complete Your Profile

Achievements

10K+ Views Earned a bronze medal
  • Arduino: Software Debouncing in Interrupt Function...

    Hey, glad I could help. :-)I suspect your bucket tipping not to happen quickly enough for you to necessarily need an interrupt for it though. Of course if you have an interrupt capable pin left over why not. But if you ever need to accomplish this without an interrupt, I'm sure reading the input in the main loop would do the trick (assuming you don't use delays and your main loop runs quickly).

    Hey there thanks for the feedback, your concerns aren't an issue though. The code should work perfectly fine as is. It is true that the "long" value of micros() will overflow after around 70 minutes due to the limited amount of numbers that can be expressed using 32 bits of memory. But this also applies when you subtract a very big number from a very small number with 32 bits of memory. 10-4294967290 would normally equal -4294967280 but a long type variable can't hold that value. Therefore long(10-4294967290) equals 16. I hope this explanation helps you understand overflows a little better.

    View Instructable »
  • Arduino: Software debouncing in interrupt function...

    Wow, thanks!I'm glad if it helped you. :-)(one time would have been enough though)

    Wow, thanks!I'm glad if it helped you. :-)

    View Instructable »