MatCat

I have a fairly complex project I am working on and I wanted to clean up the code and make some of it re-usable in the form of libraries. One of those libraries is AnalogDebounce, a library for debouncing button keypads that utilize voltage division and analog input for single pin operation. I could not find a single library or example for it so I made my own!

You can get the library at https://github.com/MatCat/AnalogDebounce

It will work out of the box for shields such as Cytron LCD and Keypad shield, or the SainsSmart (Which I think is identical? to the Cytron one).

As I work on the library I will keep the GIT repo up to date and announce changes here.

MatCat

As far as specifying the resistors that is interesting... I will have to experiment around with the idea and see if it would work well. I do want to make it easier to specify buttons and values beyond the standard set now.

I want to share a thought but, I will have to use an example to do it.

I have a Olimex STM 32 (LeafLabs Maple clone) and the counts are different when using analog buttons in comparison to the Arduino Uno. To use the DFRobot sketches, I had to adjust the values by testing each button with the serial monitor showing the analogRead results. This is because of the higher bit resolution of the analogRead.

That being said, to be able to port the library to other boards such as the Due, you may need a way to work with a spread of analogRead results.

I hate to ask a stupid question, but can you give me a schematic or wiring diagram for how to hook up the wires to uses your library. I have seen a couple of different ways to do it online, and have not gotten one to work. I feel like a reference would be handy to go along with the library. Thanks in advance.