My code:
void button_clicked(system_event_t event, int param)
{
int times = system_button_clicks(param);
Serial.printlnf("setup button was clicked %d times", times);
Particle.connect();
}
void setup()
{
System.on(button_click, button_clicked);
}
When I press the setup button, I get red blinks (SOS, 10, SOS 10) - Assertion Failure
When I leave the line ‘Particle.connect()’ out, it works fine.
How can I do this?
//UPDATE
button_final_click event acts the same way