Update connect() command to "l"

This commit is contained in:
Matt 2016-04-12 00:07:01 -04:00
parent 5802785ae0
commit 56e365fe52
2 changed files with 7 additions and 7 deletions

View File

@ -43,12 +43,14 @@ void loop () {
}
//
//c - color - followed by String
//l - light - followed by String
//
void cmd (char val) {
if (val == 'c') {
if (val == 'i') {
Serial.println("i");//confirm connection
} else if (val == 'l') {
colorString();
Serial.println("c");//End of action
Serial.println("l");//End of action
}
}

View File

@ -15,7 +15,7 @@
Adafruit_NeoPixel light = Adafruit_NeoPixel(1, PIXELPIN, NEO_GRB + NEO_KHZ800);
String color = "000,000,000,000";
String color = "000,000,000";
volatile int commaR = 0;
volatile int commaG = 0;
@ -53,7 +53,7 @@ void loop () {
}
//
//c - color - followed by String
//l - light - followed by String
//
void cmd (char val) {
if (val == 'i') {
@ -72,8 +72,6 @@ void cmd (char val) {
//100 - WORKS
//25? - WORKS
//5 - WORKS - STAY HERE FOR NOW
//got down to ~10ms, will take hours off 4000 frame roll
//timing may also change when switching to pixie
void colorString () {
while (Serial.available() == 0) {
//Wait for color string