This commit is contained in:
Max Hunt 2018-09-27 14:52:14 +01:00
parent e5ed98bae0
commit 5bb20a3640
2 changed files with 60 additions and 61 deletions

Binary file not shown.

View File

@ -1,4 +1,4 @@
#include <Key.h> #include <Keyboard.h>
#include <Keypad.h> #include <Keypad.h>
const byte ROWS = 4; // Four rows const byte ROWS = 4; // Four rows
@ -20,17 +20,17 @@ Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
#define ledpin 11 #define ledpin 11
void setup() void setup() {
{ Keyboard.begin();
pinMode(ledpin,OUTPUT); pinMode(ledpin,OUTPUT);
digitalWrite(ledpin, HIGH); digitalWrite(ledpin, HIGH);
Serial.begin(9600); Serial.begin(9600);
} }
//funcs: //funcs:
void fmtky() {} void fmf1() {}
void fmlol() {} void fmf2() {}
void fmnws() {} void fmf3() {}
void fmfky() {} void fmfky() {}
void fmshl() {} void fmshl() {}
void fmshg() {} void fmshg() {}
@ -48,19 +48,18 @@ void fmexr() {}
void loop() void loop() {
{
char key = kpd.getKey(); char key = kpd.getKey();
if(key) { if(key) {
switch (key) { switch (key) {
case '0': case '0':
fmtky(); fmf1();
break; break;
case '1': case '1':
fmlol(); fmf2();
break; break;
case '2': case '2':
fmnws(); fmf3();
break; break;
case '3': case '3':
fmfky(); fmfky();