Last active
September 2, 2015 03:26
-
-
Save LindseyB/987e247e2021f697e6b8 to your computer and use it in GitHub Desktop.
This file contains 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
// rainbow the main LED on twitter mention (just setup an IFTTT to trigger the publish of an even with "bloop") | |
void setup() { | |
Particle.subscribe("bloop", myHandler); | |
RGB.control(true); | |
} | |
void loop() { | |
//nothing to see here! | |
} | |
void myHandler(const char *event, const char *data) { | |
RGB.color( 255, 0, 0); | |
delay(500); | |
RGB.color( 255, 100, 0); | |
delay(500); | |
RGB.color( 255, 175, 0); | |
delay(500); | |
RGB.color( 255, 255, 0); | |
delay(500); | |
RGB.color( 175, 255, 0); | |
delay(500); | |
RGB.color( 100, 255, 0); | |
delay(500); | |
RGB.color( 0, 255, 0); | |
delay(500); | |
RGB.color( 0, 255, 255); | |
delay(500); | |
RGB.color( 0, 175, 255); | |
delay(500); | |
RGB.color( 0, 80, 255); | |
delay(500); | |
RGB.color( 0, 0, 255); | |
delay(500); | |
RGB.color( 175, 0, 255); | |
delay(500); | |
RGB.color( 255, 0, 255); | |
delay(500); | |
RGB.color( 255, 0, 175); | |
delay(500); | |
RGB.color(0, 0, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment