I can’t seem to get keypad library to work. Pic represents hookup, hellokeypad example configured for my pinout as posted. I have no idea what could be wrong, if i simply write my own code, it works fine. Lib version is 2.0, latest is 2.1 which doesn’t work either. Ow and, i did continuity check on all pins, and everything is as it should. Any help or ideas would be greatly appreciated. Cheers, Val
I’m really sorry for misleading, but apparently i’ve made a mistake, my own code doesn’t work either (i only tested one pin before…).
Either way, i’ve tried A LOT of things in the past few days and here is what i’ve diagnosed. If i connect any pin to 5V, ALL the other pins get 5V on them (or a little less due to resistance, less voltage the more the pins are separated). Now the problem is, there is NO short circuits, i’ve checked 10 times. So my question is, how the hell is that possible! Any ideas would be greatly appreciated, since i have NO idea what else could be wrong…
I believe the first problem you have is the resistors you added. The keypad is scanned by enabling the internal pullups and thereby creating a logic HIGH on the pins to be read. Then a logic low is output on each column pin (one by one) and the row pins read. If a key is pushed, it should produce a logic LOW on the coresponding row pin. With 8k of resistance and a 20k pullup, that’ll make a tad under 1.5V at the pin … which may not be enough to produce a LOW. Ditch the resistors or at least make them all 1k (if you think you need them).
As for the 5V you read on every pin … I don’t know what to say. What were the test conditions ? Was this with the keypad completely separated from the Arduino ? Or ???
Thank you for your reply! I’ve tried without the resistors already, same problem… But thank you for explaining.
As for the test conditions. I hooked up one pin on the keyboard to arduino’s Vcc, the rest of the pins were completely disconnected from anything. Then i used my multimeter to measure voltage on pins, and i used arduino’s GND for the other lead. Really, i have no idea either, how the hell is that possible, no short circuits, and if i do a continuity check with my multimeter, everything works as it should…
Idk, i think i’m gonna have to buy a new keypad, cause this is getting pretty lame… Cheers, Val
It was a soldering problem, still no idea where lol. Anyway, i resoldered the header pins and everything is working fine, finally! I think the header pins might have been a bit too short for the protoboard before, causing unreliable connections… Tho that is really weird, since i did continuity checks and everything seemed fine…