The IDE won't recognize my clone pro micro. I have the board selected as "Arduino Micro", however there aren't any serial ports I can select that have the typical board name in parenthesis, and I just have COM1, which will just be stuck uploading for a while and then say an error occurred.
Code:
#include <Keyboard.h>
#include <Keypad.h>
const byte ROWS = 4;
const byte COLS = 3;
char keys[ROWS][COLS] = {
{'9', '8', '7'},
{'6', '5', '4'},
{'3', '2', '1'},
{'a', 'b', '0'},
};
byte rowPins[ROWS] = {2,3,4,5};
byte colPins[COLS] ={15,14,16};
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup() {
Serial.begin(9600);
Keyboard.begin();
}
void sendMacroCommand(uint8_t key){
Keyboard.press(key);
}
void loop() {
char key = keypad.getKey();
if (key) {
Serial.println(key);
switch (key) {
case '9':
sendMacroCommand(KEY_LEFT_CTRL);
sendMacroCommand('c');
break;
case '8':
sendMacroCommand(KEY_LEFT_CTRL);
sendMacroCommand('v');
break;
case '7':
break;
case '6':
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press('r');
delay(150);
Keyboard.releaseAll();
Keyboard.print("C:\\Users\\Clark\\Desktop\\Games");
Keyboard.press(KEY_RETURN);
break;
case '5':
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press('r');
delay(150);
Keyboard.releaseAll();
Keyboard.print("C:\\Users\\Clark\\Desktop\\Create");
Keyboard.press(KEY_RETURN);
break;
case '0':
break;
case '3':
break;
case '2':
break;
case '1':
break;
case '4':
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_LEFT_SHIFT);
Keyboard.press(KEY_LEFT_ALT);
Keyboard.press('c');
break;
}
delay(100);
Keyboard.releaseAll();
}
}
Thanks for any help you can give.