I got the Sonoff working and can control the relay and the led. Now I’d like to take the next step to add a motion sensor on the extra pin. Maybe wrong, but I chose the board as an UNO so there are not I/O above 12. I’ve read that the Sonoff pin is either 14 or 15. I’ve tried the following code to treat it as a virtual pin with no luck. What am I doing wrong? Thanks
CAYENNE_IN(V15){ //Change V0 to whatever your virtual pin number is. Create additional CAYENNE_IN functions for additional virtual pins
Serial.println(“Receiving Data”);
//code here - do whatever you want to do ex digitalWrite
digitalWrite(15,!digitalRead(15));