Hi all
I used the overridden function thinger_state_listener as suggested here
I used it to display either a red or green led to show connectivity. All is well.(Using a MKR GSM 1400)
My question is: Does this method (thinger_state_listener(state)) get called only when there is a status change?
In other words - given my function:
ThingerMKRGSM::thinger_state_listener(state);
switch(state){
case THINGER_AUTHENTICATED:
// turn on led or beep
Serial.println("Authenticated");
digitalWrite(green_led, LOW);
digitalWrite(red_led, HIGH);
break;
default:
// turn off led or beep
Serial.println("Not authenticated");
digitalWrite(green_led, HIGH);
digitalWrite(red_led, LOW);
break;
}
If I wanted to make a flashing led to show when not authenticated, would I need to set a Boolean within the function and then use this in the main loop to enable the (non-blocking) flash?