Thankfully, the column drivers are not connected together, which could easily blow the Leonardo's output drivers. However, if you pushed more than one button at the same time, there is an indirect route through the switches that could do that. Better check your outputs...
#include <Joystick.h>
#include <Keypad.h>
const byte ROWS = 2; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
{'B','1','g'},
{'I','2','t'},
};
byte rowPins[ROWS] = {15, 14,}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {16, 10, 8,}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
Serial.begin(9600);
}
void loop(){
char key = keypad.getKey();
if (key != NO_KEY){
Serial.println(key);
}
}
with this code even if i dont have the diodes the problem of if switch 1a is turned on and switch 2b is turned on after the former 1a does not turn off and 2b does not turn on and vice versa. now the problem is only a single button in the whole matrix is detected.
how does this fit to the image you have have posted?
byte rowPins[ROWS] = {15, 14,}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {16, 10, 8,}; //connect to the column pinouts of the keypad
please post a picture of YOUR schematic (not the breadboard view!)
please post real pictures of your setup wherein we can see each and every connection you have made.
Excellent, In the future you'll get better help faster if you post actual pictures of your project.
BTW, I still think it would be wise of you to do so. The circuit you originally created is one wire short of being able to burn out your Arduino and it's entirely possible that you still have a dangerous condition.
Just a suggestion though.
Are you actually using a Pro Micro rather than a Uno? If so, why it it not plugged into the breadboard? Pro Micro is made to plug into a breadboard. Maybe this is why your circuit is a rat's nest of wires?
i can plug the pro micro into the board and it still would be wires given the amount of switches.anyways now i have simply soldered the diodes to the switches themselves and the wires to the diodes all of that respectively. much cleaner now and easier to work with.