Skip to content

ElectricRCAircraftGuy/eRCaGuy_EventReader

Repository files navigation

Status

Update from 11 Apr. 2020:

The algorithm is sound, but the code could use a good cleaning and some unit tests since I'm much more skilled now. Nevertheless, it does work, so use it.

The only functional example right now may be debounce_event_USE_THIS_EXAMPLE, so use this example!

See also my answer on Stack Overflow here: https://stackoverflow.com/questions/60850806/how-to-debounce-a-bitmask-readings-with-arduino-not-buttons/61153060#61153060.

Readme for eRCaGuy_ButtonReader eRCaGuyEventReader

By Gabriel Staples
Readme Written: 31 May 2014
Readme Last updated: 4 June 2017

SEE HEADER FILE FOR NEW INFO AND DETAILS. This library replaces eRCaGuy_ButtonReader.

TODO: create more examples to demonstrate how to use eRCaGuyEventReader, and update this readme and all links herein.

================

Readme Update History (newest on top)
-20150804: updated links, instructions, & license info

Library Updates (newest on top):

-20141031: corrected a bug which prevented multiple buttons from working; added a 5 button example.

Instructions

Donate and download above. Install the library into the Arduino IDE (using Sketch --> Include Library --> Add .ZIP Library), then run the examples to see how to use the library. You may view the examples in the IDE under File --> Examples --> eRCaGuy_ButtonReader.

Description

  • I wanted a simple and universal, yet very powerful & reliable library to read a button or switch in such a way that I can easily implement toggled actions and momentary actions, know the true, debounced state of a button or switch at any given time, and specify whether I want an action to take place when the button is pressed or released.
  • This library makes implementing all of these things easy for me, and I now use it on all of my projects that require reading a button or switch, so I wanted to share it with others.
  • Hopefully you find it useful too.

Be sure to check out the links above. I hope you find this useful.
Sincerely,
Gabriel Staples
http://www.ElectricRCAircraftGuy.com

About

-the most thorough and robust button and event debouncing algorithm for Arduino that man has ever known :)

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages