Next the library Keypad has to know what keypad is connected to the microcontroller. If you want to use for example an ESP32 NodeMCU, you have to uncomment the lines of code for the ESP32 and comment the lines for the Arduino boards. The program code is commented for Arduino boards. In my case I used the pins 2 to 9 for Arduino, pins D1 to D8 for all ESP8266 microcontroller and the first digital pins on one site of the ESP32 NodeMCU. You can use every digital I/O pin on your microcontroller. The last part in the section where we define the variables for the wiring between the microcontroller and the keypad. Make sure that the number of rows and columns is right. If your keypad has a different layout, then you can change the layout with this matrix. To be able to identify the keypad right we create a matrix with the keypad. Then we define the number of rows and columns your keypad has. In the first line we include the previous or already installed library Keypad.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |