From 03374109fa49db7657fd92dbf064b0ae3d54f67d Mon Sep 17 00:00:00 2001 From: Max Hunt Date: Fri, 28 Sep 2018 19:32:53 +0100 Subject: [PATCH] Update --- firmware/main/main.ino | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/firmware/main/main.ino b/firmware/main/main.ino index c05f097..c783e24 100644 --- a/firmware/main/main.ino +++ b/firmware/main/main.ino @@ -6,6 +6,7 @@ #define NUM_LED 4 #define LED_PIN 7 CRGB led[NUM_LED]; +char currentRGB = i; //Declarations KEYPAD const byte ROWS = 4; const byte COLS = 4; @@ -31,9 +32,20 @@ void setA(int red, int grn, int blu){led[2] = CRGB(red, grn, blu);} void setS(int red, int grn, int blu){led[3] = CRGB(red, grn, blu);} void show(){FastLED.show();} -void fmf1() {} -void fmf2() {} -void fmf3() {} +void fmf1() {setAll(125, 241, 255);show();} +void fmf2() {setAll(255, 0, 255);show();} +void fmf3() { + switch (currentRGB) { + case "i": + setQ(255, 0, 63);setW(255, 246, 0);setA(0, 128, 0);setS(255, 0, 63);show();currentRGB = "r"; + break; + case "o": + setAll(0, 0, 255);show();currentRGB = "i"; + break; + default: + setAll(0, 0, 0);show();currentRGB = "o"; + break; + } void fmfky() {Keyboard.print("Fuck You");} void fmshl() {Keyboard.println("ssh root@192.168.1.85");} void fmshg() {Keyboard.println("ssh -p 9999 root@git64.ddns.net");}