Skip to content

Commit abe1e64

Browse files
committed
OTA Example: add Arduino NANO ESP32 support
1 parent bf13988 commit abe1e64

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/OTA/OTA.ino

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@
3636
static char const SSID[] = SECRET_SSID; /* your network SSID (name) */
3737
static char const PASS[] = SECRET_PASS; /* your network password (use for WPA, or use as key for WEP) */
3838

39+
40+
#if defined(ARDUINO_NANO_ESP32)
41+
static char const OTA_FILE_LOCATION[] = "https://downloads.arduino.cc/ota/NANO_ESP32_Blink.ino.ota";
42+
#else
3943
static char const OTA_FILE_LOCATION[] = "https://downloads.arduino.cc/ota/LOLIN_32_Blink.ino.ota";
44+
#endif
4045

4146
/******************************************************************************
4247
* SETUP/LOOP
@@ -95,7 +100,11 @@ void setup()
95100
}
96101

97102
Serial.println("Performing a reset after which the bootloader will start the new firmware.");
103+
#if defined(ARDUINO_NANO_ESP32)
104+
Serial.println("Hint: Arduino NANO ESP32 will blink Red Green and Blue.");
105+
#else
98106
Serial.println("Hint: LOLIN32 will blink Blue.");
107+
#endif
99108
delay(1000); /* Make sure the serial message gets out before the reset. */
100109
ota.reset();
101110
}

0 commit comments

Comments
 (0)