Order of functions at boot up

A quick question… at boot up what happens first BLYNK_CONNECT() then void setup() or the other way round?

Blynk connect only fires after Blynk is connected. Are you thinking blynk begin?

Edit. Hmm I’m thinking “connected”

Don’t have to docs right now…

I’m not aware of a Blynk callback function called BLYNK_CONNECT()
I assume you mean BLYNK_CONNECTED() ?

BLYNK_CONNECTED() is triggered when the connection to Blynk is established or re-established.
If your Blynk.begin or Blynk.connect call is made within void setup (which it almost certainly is) then clearly void setup will be first.

It’s actually very simple to prove this for yourself, using a few strategically placed and descriptive serial print statements.


Normally we have this

void setup()
void loop()

What is the order of operation at boot up?

@PeteKnight thanks for that I just saw your answer now.

1st, setup blynk begin
2bd , void loop blynk run
3rd , if blynk is connected, do something


1 Like