Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "SparkButton/SparkButton.h"
- SparkButton b = SparkButton();
- bool rainbow_mode = false;
- void setup() {
- // initialize Spark button
- b.begin();
- // register led control function
- Spark.function("led", ledControl);
- }
- void loop() {
- }
- int ledControl(String command) {
- b.rainbow(2);
- delay(500);
- b.allLedsOff();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement