Here is code, i know this must be very basic but I am quite new to this and I have spent quite a lot of time and cannot work out how it works. CHANNEL 1 will work, but I can get channel 2 to work, if i call them both channel 1 with different pins it will only switch one, i would really appreciate to know what I am doing wrong.
#define VIRTUAL_CHANNEL 1
#define ACTUATOR_PIN 4 // Do not use digital pins 0 or 1 since those conflict with the use of Serial.
#define VIRTUAL_CHANNEL 2
#define ACTUATOR_PIN 5 // Do not use digital pins 0 or 1 since those conflict with the use of Serial.
Cayenne.begin(username, password, clientID);
// This function is called when data is sent from Cayenne.
int value = getValue.asInt();
CAYENNE_LOG(“Channel %d, pin %d, value %d”, VIRTUAL_CHANNEL, ACTUATOR_PIN, value);
// Write the value received to the digital pin.