Learn how to read the pressed button from a 4x4 matrix keyboard with this Arduino tutorial for beginners.
There are many kinds of matrix keypads. A flat one, the so-called membrane keypad, but there keypads with tactile switches available as well. Even the size can vary per model. Below, in the component section, there are all kinds of keypads listed with the sizes 4x3, 4x4, 4x1, 5x1, 6x1 and 3x4. They all work the same way: for each row and column there is a pin.
When you press a key, a row and colomn is connected. This makes two pins on the Arduino HIGH. In this way we can determine which button has been pressed. In this video I explain how you can use a keypad library to make your life easier.
My name is Bas van Dijk, entrepreneur, software developer and maker. With Bas on Tech I share video tutorials with a wide variety of tech subjects i.e. Arduino and 3D printing.
Years ago, I bought my first Arduino with one goal: show text on an LCD as soon as possible. It took me many Google searches and digging through various resources, but I finally managed to make it work. I was over the moon by something as simple as an LCD with some text.
With Bas on Tech I want to share my knowledge so others can experience this happiness as well. I've chosen to make short, yet powerful YouTube videos with a the same structure and one subject per video. Each video is accompanied by the source code and a shopping list.