void setup() { b.begin(); // playSong takes a string in the format // "NOTE,TYPE,NOTE,TYPE..." // Types are note types that define duration so // 8 is a 1/8th note and 4 is a 1/4 note b.playSong("C4,8,E4,8,G4,8,C5,8,G5,4"); }
void setup() { // Use b.begin(1); if you have the original SparkButton, which does not have a buzzer or a plastic enclosure // to use, just add a '1' between the parentheses in the code below. b.begin(); //This is all you need to make the function controller() available to the internet //The API name and the local name don't need to be the same; just my style Particle.function("controller", controller); //This function figures out what combination color, brightness and LEDs to display makeColors(); }
void setup() { // Tell b to get everything ready to go // Use b.begin(1); if you have the original SparkButton, which does not have a buzzer or a plastic enclosure // to use, just add a '1' between the parentheses in the code below. b.begin(); }
void setup() { //agregar un 1 si es el SparkButton original button.begin(); Particle.function("allOn", allOn); Particle.function("allOff", allOff); }
void setup() { b.begin(); b.allLedsOff(); }
void setup() { //agregar un 1 si es el SparkButton original button.begin(); }