Skip to content

Instantly share code, notes, and snippets.

@SaraJo
Created September 25, 2014 18:51
Show Gist options
  • Save SaraJo/3d72a74ffc7e46cf219d to your computer and use it in GitHub Desktop.
Save SaraJo/3d72a74ffc7e46cf219d to your computer and use it in GitHub Desktop.
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