Mechanical keyboard coding help

Hello people,

I have recently started playing around with arduino boards since i wanted to build custom keypads, macro pads and keyboards.

After lots of reading and troubleshooting, i was able to upload code to my pro micro.

However, i cant figure out how i can make my mechanical switches to work .

From what i understand, there’s something missing in the code since, if i short a pin with the grnd, i can see an output.

Hardware info:

Pro micro atmega32u4.

There are 8 cherry switches and i have connected 1 pin from each switch with a diode (doublechecked to see that the orientation is correct), the diodes are all soldered in a row and the last diode is connected to the grnd with a wire.

i have also soldered 3/8 switches to some pins to test if they work before connecting the rest of them .

This is the code that i managed to stitch together from random tutorials on the internet.

Thank you in advance :slight_smile:

ArrowKeypad.ino (809 Bytes)

"From what i understand, there's something missing in the code since, if i short a pin with the grnd, i can see an output."

That's confusing. That behaviour would prove to me, that it is working and maybe switches are not wired correctly.

Instead of a verbal diagram, can you please post an image?

If You read t6he advicing topics telling things like "How to use this forum" You will know how to use code tags, up and left in this window. That creates a window were helpers can scroll the code. Helpers using smartphones, tablets etc. have no IDE, can't download code and can't help You.

Clean up Your presentation a bit. Know that You are explaining the issue to totally ignorant people, knowing nothing about Your stuff. Too much of Your presentation makes no sence at all. Loose ends like.

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile: