Welcome to the cayenne community @jwmalbreiki
if you want to learn how the library work then it is quite hard. here are all the code file which cayenne developer have build so that the cayenne users can have ease at doing IOT project. Cayenne-MQTT-Arduino/src at master · myDevicesIoT/Cayenne-MQTT-Arduino · GitHub
In short, what you need to know is:
CAYENNE_OUT()
----> this function is used to send data from your Arduino to cayenne.
CAYENNE_IN()
----> this function is used to receive data from cayenne to your Arduino.
virtual_channel
—> this are channel or path number used to communicate between your arduino and cayenne.
example:
CAYENNE_OUT(2) // this function sends data to cayenne on channel 2
{
Cayenne.virtualWrite(2, x, "temp", "c"); // this line is used to send data `x` on channel `2` with type value = `temp` and unit type = `c`
}
You can read more about virtualWrite and data types here Data types for Cayenne MQTT API
CAYENNE_IN(6) // this function is called whenever we get value from dashboard
{
int x = getValue.asInt(); stores the value received from the cayenne into `x`
}