This commit is contained in:
Max Hunt 2018-09-28 19:37:14 +01:00
parent 03374109fa
commit 1ff2f69014
2 changed files with 56 additions and 60 deletions

View File

@ -22,11 +22,15 @@ Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
char ctrlKey = KEY_LEFT_CTRL; char ctrlKey = KEY_LEFT_CTRL;
void setup() { void setup() {
Keyboard.begin(); Keyboard.begin();
pinMode(ledpin,OUTPUT); pinMode(ledpin,OUTPUT);
digitalWrite(ledpin, HIGH); digitalWrite(ledpin, HIGH);
// Serial.begin(9600);
} }
//funcs: //funcs:
@ -47,12 +51,6 @@ void fmcbv() {Keyboard.press(ctrlKey);delay(20);Keyboard.press(98);delay(20);Key
void fmcbs() {Keyboard.press(ctrlKey);delay(20);Keyboard.press(98);delay(20);Keyboard.releaseAll();delay(5);Keyboard.print("s");} void fmcbs() {Keyboard.press(ctrlKey);delay(20);Keyboard.press(98);delay(20);Keyboard.releaseAll();delay(5);Keyboard.print("s");}
void fmexr() {Keyboard.println("exit");delay(5);}//ln void fmexr() {Keyboard.println("exit");delay(5);}//ln
void loop() { void loop() {
char key = kpd.getKey(); char key = kpd.getKey();
if(key) { if(key) {
@ -105,9 +103,7 @@ void loop() {
case 'f': case 'f':
fmexr(); fmexr();
break; break;
// default: }
// Serial.println(key);
}
delay(100); delay(100);
} }
} }

View File

@ -4,7 +4,7 @@
//Declarations LED //Declarations LED
#define NUM_LED 4 #define NUM_LED 4
#define LED_PIN 7 #define LED_PIN 11
CRGB led[NUM_LED]; CRGB led[NUM_LED];
char currentRGB = i; char currentRGB = i;
//Declarations KEYPAD //Declarations KEYPAD