You can check if new value arrived via Z-Wave using zunoIsChannelUpdated().
Good examples of usage of dynamic configuration are Modem example and multiple DS18B20 temperature sensors.
More examples in our GitHub repository.
Below is the Radio Blink sketch from Z-Uno paper manual made in static getter/setter style
byte dimmerValue = 99;
ZUNO_SETUP_CHANNELS(ZUNO_SWITCH_MULTILEVEL(getSwitchMultilevelValue, setSwitchMultilevelValue));
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(dimmerValue*10);
digitalWrite(LED_BUILTIN, LOW);
delay(dimmerValue*10);
}
void setSwitchMultilevelValue(byte newValue) {
dimmerValue = newValue;
}
byte getSwitchMultilevelValue(void) {
return dimmerValue;
}
Below is the Radio Blink sketch from Z-Uno paper manual made in static vartiable style
byte dimmerValue = 99;
ZUNO_SETUP_CHANNELS(ZUNO_SWITCH_MULTILEVEL(dimmerValue, NULL));
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(dimmerValue*10);
digitalWrite(LED_BUILTIN, LOW);
delay(dimmerValue*10);
}
Below is the Radio Blink sketch from Z-Uno paper manual made in dynamic style
ZUNO_ENABLE(WITH_CC_SWITCH_BINARY);
void setup() {
ZUNO_START_CONFIG();
ZUNO_ADD_CHANNEL(ZUNO_SWITCH_MULTILEVEL_CHANNEL_NUMBER, 0, 0);
ZUNO_COMMIT_CONFIG();
pinMode(LED_BUILTIN, OUTPUT);
g_channels_data[0].bParam = 0xFF;
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(g_channels_data[0].bParam * 10);
digitalWrite(LED_BUILTIN, LOW);
delay(g_channels_data[0].bParam * 10);
}