diff --git a/ArduinoProps.zip b/ArduinoProps.zip index 4aebcbf..229ba9c 100644 Binary files a/ArduinoProps.zip and b/ArduinoProps.zip differ diff --git a/examples/BlinkOnBridgeProps/BlinkOnBridgeProps.ino b/examples/BlinkOnBridgeProps/BlinkOnBridgeProps.ino index e11a8fb..b07e0de 100644 --- a/examples/BlinkOnBridgeProps/BlinkOnBridgeProps.ino +++ b/examples/BlinkOnBridgeProps/BlinkOnBridgeProps.ino @@ -68,6 +68,10 @@ void InboxMessage::run(String a) { props.sendAllData(); props.sendDone(a); } + else if (a == u8"reset-mcu") + { + props.resetMcu(); // we prefer SSH command: echo %BROKER%> /root/broker && reset-mcu + } else if (a == "clignoter:1") { clignoter.setValue(true); diff --git a/examples/BlinkOnEthernetProps/BlinkOnEthernetProps.ino b/examples/BlinkOnEthernetProps/BlinkOnEthernetProps.ino index f58dff6..f35d5a3 100644 --- a/examples/BlinkOnEthernetProps/BlinkOnEthernetProps.ino +++ b/examples/BlinkOnEthernetProps/BlinkOnEthernetProps.ino @@ -52,7 +52,7 @@ void setup() } delay(1500); // time for shield stuff - + // can do more static IP configuration, must be called after Ethernet.begin() //Ethernet.setSubnetMask(IPAddress(255, 255, 255, 0)); //Ethernet.setGatewayIP(IPAddress(192, 168, 1, 1)); @@ -92,6 +92,10 @@ void InboxMessage::run(String a) { props.sendAllData(); props.sendDone(a); } + else if (a == u8"reset-mcu") + { + props.resetMcu(); + } else if (a == "clignoter:1") { clignoter.setValue(true); diff --git a/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino b/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino index e6179ab..f1cbcab 100644 --- a/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino +++ b/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino @@ -105,6 +105,10 @@ void InboxMessage::run(String a) { props.sendAllData(); props.sendDone(a); } + else if (a == u8"reset-mcu") + { + props.resetMcu(); + } else if (a == "clignoter:1") { clignoter.setValue(true); diff --git a/src/Props.cpp b/src/Props.cpp index 5b96a10..3b08e1e 100644 --- a/src/Props.cpp +++ b/src/Props.cpp @@ -102,7 +102,7 @@ void Props::resetMcu() { #if defined(ARDUINO_ARCH_SAMD) NVIC_SystemReset(); -#elif defined(__AVR__) +#elif defined(ARDUINO_ARCH_AVR) wdt_enable(WDTO_15MS); while (true); #endif