It’s a paper based keypad and it costs less than RM 7. Perfect for my needs. Another plus point about this keypad is I don’t need to solder any wires or headers on it.
It already comes with a female header and all I need to do is to plug in a male-to-male header into it. That will make it easier to be plugged into a breadboard.
Remember this circuit?
It’s the 7 Segment circuit from two posts ago. Now I plan to add in the keypad to display the digits according to what I press on the keypad.
Unfortunately, I ran out of digital pins. I didn’t expect this day to come so soon, I thought the Arduino Mega is overkill but now I understand why some people prefer it over the Uno.
From the picture, you might think that the pins are just enough. But actually it’s not. I’m already taking the first two digital pins which are RX and TX and they have 1k of resistance from the MCU’s pin.
Since I don’t have the luxury of owning a Mega, what I can do is to make use of my two Arduinos, the Uno and the Nano. I connected the keypad to the Nano and program it to talk to the Uno through serial communication.
Connecting it is pretty simple, the TX pin from the Nano goes to RX on the Uno and RX from the Nano goes to TX on the Uno. Basically just inverting them.
I also linked both the 5V and Ground together so that they can share the power source. All I need to do is to either power up the Nano or the Uno.
Here is the code I wrote for the Uno,
and the Nano,
Two Arduinos working hand in hand 🙂
And finally, here’s a demonstration video.
Thanks for reading 🙂