[SOLVED] Volatile variables in Arduino

Hello

Should all Arduino variables be declared as volatile inside BLYNK_CONNECTED, BLYNK_WRITE… functions? Are these functions interupt routine or not really?

Regards

The variables in Blynk functions are not interrupt based so you shouldn’t declare them as volatile.

2 Likes

Are there any possible cosequences if I still declare them volatile?

Regards

No, there should be no really BAD consequences. Some sub-optimal code can be generated (but usually no issue)

1 Like