Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit a817701

Browse files
authored
v1.3.0 to add support to RP2040-based boards
### Major Release v1.3.0 1. Add support to RP2040-based boards, such as **Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed).
1 parent c2b14a5 commit a817701

21 files changed

+665
-89
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1414

1515
Please ensure to specify the following:
1616

17-
* Arduino IDE version (e.g. 1.8.13) or Platform.io version
17+
* Arduino IDE version (e.g. 1.8.15) or Platform.io version
1818
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, STM32 core v2.0.0, etc.)
1919
* Contextual information (e.g. what you were trying to achieve)
2020
* Simplest possible steps to reproduce
@@ -26,10 +26,10 @@ Please ensure to specify the following:
2626
### Example
2727

2828
```
29-
Arduino IDE version: 1.8.13
29+
Arduino IDE version: 1.8.15
3030
Arduino STM32 Core v2.0.0
3131
OS: Ubuntu 20.04 LTS
32-
Linux xy-Inspiron-3593 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
32+
Linux xy-Inspiron-3593 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
3333
3434
Context:
3535
I encountered an endless loop while trying to connect to Local WiFi.
@@ -40,6 +40,7 @@ Steps to reproduce:
4040
3. ...
4141
4. ...
4242
```
43+
4344
### Sending Feature Requests
4445

4546
Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.

README.md

Lines changed: 157 additions & 24 deletions
Large diffs are not rendered by default.

examples/AutoConnect/AutoConnect.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
Built by Khoi Hoang https://github.com/khoih-prog/ESP_AT_WiFiManager
1212
Licensed under MIT license
13-
Version: 1.2.0
13+
Version: 1.3.0
1414
1515
Version Modified By Date Comments
1616
------- ----------- ---------- -----------
@@ -19,7 +19,8 @@
1919
1.0.2 K Hoang 02/07/2020 Add support to ESP32-AT-command shields.
2020
1.0.3 K Hoang 28/07/2020 Add support to STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 boards. Add Packages' Patches.
2121
1.1.0 K Hoang 27/04/2021 Use new FlashStorage_STM32 library. Add support to new STM32 core v2.0.0 and STM32L5
22-
1.2.0 K Hoang 12/05/2021 Add support to RASPBERRY_PI_PICO
22+
1.2.0 K Hoang 12/05/2021 Add support to RASPBERRY_PI_PICO using Arduino-pico core
23+
1.3.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
2324
*****************************************************************************************************************************/
2425
// Credits of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip) for this simple yet effective method
2526
// For some STM32, there is only definition of Serial in variant.h, and is used for Serial/USB Debugging

examples/AutoConnect/defines.h

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,43 @@
303303
#define BOARD_TYPE "STM32 Unknown"
304304
#endif
305305

306-
#elif ( ARDUINO_ARCH_RP2040 || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) )
306+
#elif ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \
307+
defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) )
307308

308309
#warning RASPBERRY_PI_PICO board selected
309-
#define BOARD_TYPE "RASPBERRY_PI_PICO"
310+
311+
#if defined(ARDUINO_ARCH_MBED)
312+
313+
#warning Using ARDUINO_ARCH_MBED
314+
#define ESP8266_AT_USE_MBED_RP2040 true
315+
316+
// Use true only for testing. Will erase stored config data
317+
#define FORCE_REFORMAT false
318+
319+
#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \
320+
defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) )
321+
// Only undef known BOARD_NAME to use better one
322+
#undef BOARD_NAME
323+
#endif
324+
325+
#if defined(ARDUINO_RASPBERRY_PI_PICO)
326+
#define BOARD_NAME "MBED RASPBERRY_PI_PICO"
327+
#elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
328+
#define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040"
329+
#elif defined(ARDUINO_GENERIC_RP2040)
330+
#define BOARD_NAME "MBED GENERIC_RP2040"
331+
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
332+
#define BOARD_NAME "MBED NANO_RP2040_CONNECT"
333+
#else
334+
// Use default BOARD_NAME if exists
335+
#if !defined(BOARD_NAME)
336+
#define BOARD_NAME "MBED Unknown RP2040"
337+
#endif
338+
#endif
339+
340+
#endif
310341

311-
#define EspSerial Serial1
342+
#define EspSerial Serial1
312343

313344
#else
314345

examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
Built by Khoi Hoang https://github.com/khoih-prog/ESP_AT_WiFiManager
1212
Licensed under MIT license
13-
Version: 1.2.0
13+
Version: 1.3.0
1414
1515
Version Modified By Date Comments
1616
------- ----------- ---------- -----------
@@ -19,7 +19,8 @@
1919
1.0.2 K Hoang 02/07/2020 Add support to ESP32-AT-command shields.
2020
1.0.3 K Hoang 28/07/2020 Add support to STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 boards. Add Packages' Patches.
2121
1.1.0 K Hoang 27/04/2021 Use new FlashStorage_STM32 library. Add support to new STM32 core v2.0.0 and STM32L5
22-
1.2.0 K Hoang 12/05/2021 Add support to RASPBERRY_PI_PICO
22+
1.2.0 K Hoang 12/05/2021 Add support to RASPBERRY_PI_PICO using Arduino-pico core
23+
1.3.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
2324
*****************************************************************************************************************************/
2425
// Credits of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip) for this simple yet effective method
2526
// For some STM32, there is only definition of Serial in variant.h, and is used for Serial/USB Debugging

examples/AutoConnectWithFeedback/defines.h

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,41 @@
303303
#define BOARD_TYPE "STM32 Unknown"
304304
#endif
305305

306-
#elif ( ARDUINO_ARCH_RP2040 || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) )
306+
#elif ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \
307+
defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) )
307308

308309
#warning RASPBERRY_PI_PICO board selected
309-
#define BOARD_TYPE "RASPBERRY_PI_PICO"
310+
311+
#if defined(ARDUINO_ARCH_MBED)
312+
313+
#warning Using ARDUINO_ARCH_MBED
314+
#define ESP8266_AT_USE_MBED_RP2040 true
315+
316+
// Use true only for testing. Will erase stored config data
317+
#define FORCE_REFORMAT false
318+
319+
#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \
320+
defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) )
321+
// Only undef known BOARD_NAME to use better one
322+
#undef BOARD_NAME
323+
#endif
324+
325+
#if defined(ARDUINO_RASPBERRY_PI_PICO)
326+
#define BOARD_NAME "MBED RASPBERRY_PI_PICO"
327+
#elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
328+
#define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040"
329+
#elif defined(ARDUINO_GENERIC_RP2040)
330+
#define BOARD_NAME "MBED GENERIC_RP2040"
331+
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
332+
#define BOARD_NAME "MBED NANO_RP2040_CONNECT"
333+
#else
334+
// Use default BOARD_NAME if exists
335+
#if !defined(BOARD_NAME)
336+
#define BOARD_NAME "MBED Unknown RP2040"
337+
#endif
338+
#endif
339+
340+
#endif
310341

311342
#define EspSerial Serial1
312343

examples/ConfigOnStartup/ConfigOnStartup.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
Built by Khoi Hoang https://github.com/khoih-prog/ESP_AT_WiFiManager
1212
Licensed under MIT license
13-
Version: 1.2.0
13+
Version: 1.3.0
1414
1515
Version Modified By Date Comments
1616
------- ----------- ---------- -----------
@@ -19,7 +19,8 @@
1919
1.0.2 K Hoang 02/07/2020 Add support to ESP32-AT-command shields.
2020
1.0.3 K Hoang 28/07/2020 Add support to STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 boards. Add Packages' Patches.
2121
1.1.0 K Hoang 27/04/2021 Use new FlashStorage_STM32 library. Add support to new STM32 core v2.0.0 and STM32L5
22-
1.2.0 K Hoang 12/05/2021 Add support to RASPBERRY_PI_PICO
22+
1.2.0 K Hoang 12/05/2021 Add support to RASPBERRY_PI_PICO using Arduino-pico core
23+
1.3.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
2324
*****************************************************************************************************************************/
2425
/****************************************************************************************************************************
2526
This example will open a configuration portal for 60 seconds when first powered up if the boards has stored WiFi Credentials.

examples/ConfigOnStartup/defines.h

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,43 @@
303303
#define BOARD_TYPE "STM32 Unknown"
304304
#endif
305305

306-
#elif ( ARDUINO_ARCH_RP2040 || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) )
306+
#elif ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \
307+
defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) )
307308

308309
#warning RASPBERRY_PI_PICO board selected
309-
#define BOARD_TYPE "RASPBERRY_PI_PICO"
310+
311+
#if defined(ARDUINO_ARCH_MBED)
312+
313+
#warning Using ARDUINO_ARCH_MBED
314+
#define ESP8266_AT_USE_MBED_RP2040 true
315+
316+
// Use true only for testing. Will erase stored config data
317+
#define FORCE_REFORMAT false
318+
319+
#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \
320+
defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) )
321+
// Only undef known BOARD_NAME to use better one
322+
#undef BOARD_NAME
323+
#endif
324+
325+
#if defined(ARDUINO_RASPBERRY_PI_PICO)
326+
#define BOARD_NAME "MBED RASPBERRY_PI_PICO"
327+
#elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
328+
#define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040"
329+
#elif defined(ARDUINO_GENERIC_RP2040)
330+
#define BOARD_NAME "MBED GENERIC_RP2040"
331+
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
332+
#define BOARD_NAME "MBED NANO_RP2040_CONNECT"
333+
#else
334+
// Use default BOARD_NAME if exists
335+
#if !defined(BOARD_NAME)
336+
#define BOARD_NAME "MBED Unknown RP2040"
337+
#endif
338+
#endif
339+
340+
#endif
310341

311-
#define EspSerial Serial1
342+
#define EspSerial Serial1
312343

313344
#else
314345
// For Mega

examples/ConfigOnSwitch/ConfigOnSwitch.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
Built by Khoi Hoang https://github.com/khoih-prog/ESP_AT_WiFiManager
1212
Licensed under MIT license
13-
Version: 1.2.0
13+
Version: 1.3.0
1414
1515
Version Modified By Date Comments
1616
------- ----------- ---------- -----------
@@ -19,7 +19,8 @@
1919
1.0.2 K Hoang 02/07/2020 Add support to ESP32-AT-command shields.
2020
1.0.3 K Hoang 28/07/2020 Add support to STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 boards. Add Packages' Patches.
2121
1.1.0 K Hoang 27/04/2021 Use new FlashStorage_STM32 library. Add support to new STM32 core v2.0.0 and STM32L5
22-
1.2.0 K Hoang 12/05/2021 Add support to RASPBERRY_PI_PICO
22+
1.2.0 K Hoang 12/05/2021 Add support to RASPBERRY_PI_PICO using Arduino-pico core
23+
1.3.0 K Hoang 28/05/2021 Add support to Nano_RP2040_Connect, RASPBERRY_PI_PICO using RP2040 Arduino mbed core
2324
*****************************************************************************************************************************/
2425
/****************************************************************************************************************************
2526
This example will open a configuration portal when no WiFi configuration has been previously entered or when a button is pushed.
@@ -117,7 +118,7 @@ void enterConfigPortal()
117118
ESP_AT_wiFiManager.setAPStaticIPConfig(staticAP_IP);
118119

119120
// Set static STA IP
120-
ESP_AT_wiFiManager.setSTAStaticIPConfig(IPAddress(192, 168, 2, 114));
121+
//ESP_AT_wiFiManager.setSTAStaticIPConfig(IPAddress(192, 168, 2, 114));
121122

122123
//Check if there is stored WiFi router/password credentials.
123124
//If not found, device will remain in configuration mode until switched off via webserver.

examples/ConfigOnSwitch/defines.h

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,43 @@
303303
#define BOARD_TYPE "STM32 Unknown"
304304
#endif
305305

306-
#elif ( ARDUINO_ARCH_RP2040 || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_GENERIC_RP2040) )
306+
#elif ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || \
307+
defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) )
307308

308309
#warning RASPBERRY_PI_PICO board selected
309-
#define BOARD_TYPE "RASPBERRY_PI_PICO"
310+
311+
#if defined(ARDUINO_ARCH_MBED)
312+
313+
#warning Using ARDUINO_ARCH_MBED
314+
#define ESP8266_AT_USE_MBED_RP2040 true
315+
316+
// Use true only for testing. Will erase stored config data
317+
#define FORCE_REFORMAT false
318+
319+
#if ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || \
320+
defined(ARDUINO_GENERIC_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) )
321+
// Only undef known BOARD_NAME to use better one
322+
#undef BOARD_NAME
323+
#endif
324+
325+
#if defined(ARDUINO_RASPBERRY_PI_PICO)
326+
#define BOARD_NAME "MBED RASPBERRY_PI_PICO"
327+
#elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
328+
#define BOARD_NAME "MBED ADAFRUIT_FEATHER_RP2040"
329+
#elif defined(ARDUINO_GENERIC_RP2040)
330+
#define BOARD_NAME "MBED GENERIC_RP2040"
331+
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
332+
#define BOARD_NAME "MBED NANO_RP2040_CONNECT"
333+
#else
334+
// Use default BOARD_NAME if exists
335+
#if !defined(BOARD_NAME)
336+
#define BOARD_NAME "MBED Unknown RP2040"
337+
#endif
338+
#endif
339+
340+
#endif
310341

311-
#define EspSerial Serial1
342+
#define EspSerial Serial1
312343

313344
#else
314345
// For Mega

0 commit comments

Comments
 (0)