In the device menu, there's an option to reboot the device. This function is enabled by default in the Blynk.Edgent examples (along with advanced provisioning).
To enable Reboot function manually in your sketch, you need to implement a device-specific procedure:
voidresetMCU(){#ifdefined(ARDUINO_ARCH_MEGAAVR)wdt_enable(WDT_PERIOD_8CLK_gc);#elifdefined(__AVR__)wdt_enable(WDTO_15MS);#elifdefined(__arm__)NVIC_SystemReset();#elifdefined(ESP8266) ||defined(ESP32)ESP.restart();#else#error"MCU reset procedure not implemented"#endiffor (;;) {}}BLYNK_WRITE(InternalPinDBG) {if (String(param.asStr()) =="reboot") {Serial.println("Rebooting..."); // TODO: Perform any neccessary preparation here, // i.e. turn off peripherals, write state to EEPROM, etc. // NOTE: You may need to defer a reboot, // if device is in process of some critical operation.resetMCU(); }}