Created
January 20, 2015 20:17
-
-
Save dmiddlecamp/04c6f0591c736f12f710 to your computer and use it in GitHub Desktop.
Sample Spark.function 'nyan' / rainbow firmware!
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 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); | |
} | |
} |
is there documentation somewhere for Spark_Signal
? this doesn't compile for me:
error: too few arguments to function 'void Spark_Signal(bool, unsigned int, void*)'
Doesn't compile. Are there missing files?
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
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
Copy and paste this code into https://www.spark.io/build/ and flash it to your Spark Photon or Spark Core! :)