Question About Keyboard Project

Hey everyone,

I have built a small macro keyboard with an Arduino pro micro and some cherry mx switches, but for some reason, I am getting no response out of it. The keys do not provide an input when pressed, and sometimes I will receive inputs when nothing is being pressed. This was my first time soldering anything, and it was a bit messy, but I am fairly certain I soldered everything correctly. Also I feel kind of stupid saying this but, I have not built a case/stand for the keyboard, so I am just testing it barebones, with the PCB exposed (Image here), so maybe its possible I damaged it some way? Also, could my USB cord be the issue? I am using a micro USB, and it does fine to communicate with the Arduino and upload sketches, but could it be blocking my key inputs?

Anyway, here is the code I used to test it

Also here is the tutorial I tried to follow while making it

Thanks, and sorry for the super long post

@skink_

Your topic was Moved to it's current location / section as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Please post a clear picture of your setup; and post it here, not a link to somewhere. It looks like the top row of pins of the ProMicro does not have pins to the ‘motherboard’; not sure if they are important in this case (no promicro or schematic at hand).

Please post a schematic (photo of hand-drawn is fine); again, post it here.

In future, please post small code here in a post between
** **[code]** **
and
** **[/code]** **
; limit for a post is 9000 characters. I’ve done it now for you.

#include "Keyboard.h"
#include <Keypad.h>
void setup() {
  // put your setup code here, to run once:
  pinMode(A0, INPUT);
  pinMode(6,INPUT);
  pinMode(7,INPUT);
  pinMode(8,INPUT);
  pinMode(9,INPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(A3,OUTPUT);
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  
  if (digitalRead(A0) ==HIGH  or digitalRead(18)==HIGH){
    Serial.println("hello");
    
    
  }

  digitalWrite(4, HIGH);
  if (digitalRead(6) == HIGH){
    Serial.println("A key was pressed in row one, column one");
    delay(100);
  }
  digitalWrite(4,LOW);
  digitalWrite(5,HIGH);
  if (digitalRead(7) == HIGH){
    Serial.println("A key was pressed in row two, column two");
    delay(100);
  }
}

How to make a schematic you can post.

Do you have pull-down resistors on pins 6 and 7? If not, what is to keep them from floating HIGH when the buttons aren't pressed?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.