Debounce with keypad.h

For this project I didn't use capacitors for debounce protection on the buttons. Mainly because it works with a button matrix and keypad library. Each build I have made has been working fine for over a year... should I add the capacitors to the next PCB run? Or.. don't fix what isn't broken?

1 Like

the keypad library handles debounce for you by only polling from time to time and ensuring the button is pressed for long enough

there are method in the library for setting this debounceTime and the holdTime

the default is 10ms for the debounce time and 500ms for the hold time

(cool project by the way)


an idea for the next iteration: use neopixels, this way the leds can be any color which opens up tons of new possibilities for the gaming and you get can rid of the resistors, control them with less pins (meaning you could addd more leds if you want to) etc

capacitive touch sensors are also pretty cool and works below plastic surfaces so you could have hidden buttons on the box for other type of interactions

Thank you for the thorough and the suggestions. I’m excited to be working on the next iteration! I’ve already started doing some testing with neo pixels and a D1 mini to add Wi-Fi capabilities.

I hadn’t thought of using capacity touch. That could make for some very interesting designs. I’ll post an update later.

A while back I recreated the look of the Merlin’s buttons by taking a metal washer with the led visible through the washer’s hole under a transparent plastic sheet (cut into those transparent slides used a long time ago to make business presentations ) and just soldered a wire to the washer that was used as a capacitive sensors. It worked OK

Is the same subject?
" LED Matrix game using keypad.h

@hackmakemodcommunity,

Your other topic on the same subject deleted.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

Understood. Thanks for the correction. I’ll make sure to be a better participant in the forum moving forward.

1 Like

That is a really interesting approach. Do you have any diagrams or posts showing how you did this? What additional electronics were used?

This

touch sensor

I've not used that board, but I have used the chip on it that does the heavy lifting and it works very well.

The keys or buttons can be just about anything you want. I use PCB pads to make buttons.

a7

For the mask over the buttons, instead of cutting the holes out of vinyl, I wonder how well it would work to inkjet or laser print onto transparency film, then cover with a sheet of self-stick laminating film to protect the printed surface?

I think I might have actually had a Merlin game long ago, or it may have been my brother's. Need to look up the actual instruction book to see how all the games worked.

That would work nicely, especially if you can have the center holes for the LEDs drilled when the PCB is made.

Regarding using an inkjet… I imagine it might still be too transparent. But it’s worth a try!

I really like the possibilities with this. I’ll give it a try this week.

I don’t that was a long time ago as an experiment but the principles is based on what’s described here

CapSense

(Image from arduino’s playground)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.