Cayenne_connected function


#1

“CAYENNE_CONNECTED() This function is called every time Cayenne connects to the server.”

How often does this roughly mean? Does it mean every time a packet is sent or just the initial connection? I’m assuming just when it first connects. Can anyone clarify? Thanks.

I’m trying to make a function that runs to determine if it is online or offline.


#2

Hi @vapor83,

You’re correct, CAYENNE_CONNECTED() is a callback function that is called by our run() loop only when a connection is made.


#3

Ah ok. Thank you very much for the info.