Skip to content

Instantly share code, notes, and snippets.

@dmiddlecamp
Created January 20, 2015 20:17
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmiddlecamp/04c6f0591c736f12f710 to your computer and use it in GitHub Desktop.
Save dmiddlecamp/04c6f0591c736f12f710 to your computer and use it in GitHub Desktop.
Sample Spark.function 'nyan' / rainbow firmware!
void setup() {
Spark.function("nyan", nyanHandler);
}
void loop() {
//nothing to see here!
}
int nyanHandler(String cmd) {
if (cmd == "on") {
Spark_Signal(true);
}
else if (cmd == "off") {
Spark_Signal(false);
}
}
@sharlee
Copy link

sharlee commented Mar 26, 2016

Can confirm doesn't compile. Pls fix this as it is linked from Particle's page: https://ifttt.com/recipes/244520-when-there-is-a-new-top-post-on-reddit-shout-rainbows

@Tekee
Copy link

Tekee commented Mar 21, 2018

Does anyone know why this coding doesn't work anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment