![]() After, connect the pins as shown in the diagram. The resistors can range from 1K to 10K ohm (I'm using 10k) but can not be omitted. Make sure to look at the full screen version for help, but basically what you have here is that pins 3,5,6 & 7 all all connected through a resistor to 5v as well as a digital pin on the Arduino. So this wiring example looks really confusing, but it's not. ![]() So in simple terms, if pins 5 and 2 (of the keypad) are signaling the arduino, it means that button 3 has been pressed - It is setup like this to minimize the number of pins needed to control the keypad. So in code we just look for the combination and we know what button is being pressed. For example, when you hit the number 3 pins 5&2 are connected, 6 connects pins 5&7 and 9 connects 5&6. The buttons on this particular keypad are setup in a 3X4 matrix format so we only need 7 pins to detect the pressing of 12 keys.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |