Created
September 25, 2014 18:51
-
-
Save SaraJo/3d72a74ffc7e46cf219d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void RFduinoBLE_onReceive(char *data, int len) | |
{ | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, 2, NEO_GRB + NEO_KHZ800); | |
strip.begin(); | |
//now set the color | |
if(data[4] == '1'){ | |
strip.setPixelColor(0, strip.Color(100, 0,100)); | |
} | |
else if(data[4] == '2'){ | |
strip.setPixelColor(0, strip.Color(100, 0,0)); | |
} | |
else if(data[4] == 3){ | |
strip.setPixelColor(0, strip.Color(100,100,0)); | |
} | |
else{ | |
strip.setPixelColor(0, strip.Color(0,255,0)); | |
} | |
strip.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment