From the course: Learning Arduino: Interfacing with Hardware

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

HelloKeypad

HelloKeypad

- [Instructor] So once you download the keypad library, you will have an example that comes in within the library itself. So in order to access the examples, you go to file, examples, and then scroll down all the way to the keypad. I'll select Hello Keypad for our example here. So we're using this example for our keypad. I just need to make some changes along the way according to the wiring that we did. All right, so I'm going to explain the code of this example in order to understand how the keypad function works. So, in line 10, we see that we need to include the library when we deal with the keypad. It's included in here. Line 12 and line 13 is initializing rows and columns of timed bytes. The rows and columns are for the keypad, so we're using 4 by 3 Key pad, so four rows and three columns. So, both rows and columns are tad bytes. The reason for selecting tad byte is that byte is unassigned integer that has…

Contents