Code: Select all
#include <supla/io.h>
class On_Off : public Supla::Io {
public:
void customDigitalWrite(int channelNumber, uint8_t pin, uint8_t val) {
// maybe choose channel or pin here
if (val){
// do something when the channel is activated
return;
}else{
// do something when the channel is deactivated
return;
}
}
}On_Off; 