Created
December 13, 2015 15:14
-
-
Save monkbroc/5a52eccfb4863fc04009 to your computer and use it in GitHub Desktop.
Beach safety
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
int setBeachStatus(String value) { | |
RGB.control(true); | |
if(value == "green") { | |
RGB.color(RGB_COLOR_GREEN); | |
return 0; | |
} else if(value == "yellow") { | |
RGB.color(RGB_COLOR_YELLOW); | |
return 0; | |
} else if(value == "red") { | |
RGB.color(RGB_COLOR_RED); | |
return 0; | |
} | |
return 1; | |
} | |
void setup() { | |
Particle.function("beach-status", setBeachStatus); | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment