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

Commit 83964d5

Browse files
authored
v1.5.2 to optimize code, etc.
### Release v1.5.2 1. Optimize code by using passing by `reference` instead of by `value` 2. Optional `Board_Name` in Menu. Check [option to remove board name from web page #25](khoih-prog/WiFiManager_NINA_Lite#25) 3. Add function `isConfigMode()` to signal system is in Config Portal mode. 4. Update `Packages' Patches`
1 parent 8abf88d commit 83964d5

26 files changed

+783
-277
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1515
Please ensure to specify the following:
1616

1717
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18-
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v2.6.1, etc.)
18+
* Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP8266 core v3.0.2, ArduinoCore-mbed v2.7.2, etc.)
1919
* Contextual information (e.g. what you were trying to achieve)
2020
* Simplest possible steps to reproduce
2121
* Anything that might be relevant in your opinion, such as:
@@ -28,9 +28,9 @@ Please ensure to specify the following:
2828
```
2929
Arduino IDE version: 1.8.19
3030
Nano_RP2040_Connect board
31-
ArduinoCore-mbed v2.6.1
31+
ArduinoCore-mbed v2.7.2
3232
OS: Ubuntu 20.04 LTS
33-
Linux xy-Inspiron-3593 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
33+
Linux xy-Inspiron-3593 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3434
3535
Context:
3636
The board couldn't autoreconnect to Local Blynk Server after router power recycling.
@@ -51,3 +51,4 @@ There are usually some outstanding feature requests in the [existing issues list
5151
### Sending Pull Requests
5252

5353
Pull Requests with changes and fixes are also welcome!
54+

README.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
77
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/ESP_AT_WM_Lite.svg)](http://github.com/khoih-prog/ESP_AT_WM_Lite/issues)
88

9-
<a href="https://www.buymeacoffee.com/khoihprog6" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
9+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Donate to my libraries using BuyMeACoffee" style="height: 50px !important;width: 181px !important;" ></a>
10+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-orange.svg?logo=buy-me-a-coffee&logoColor=FFDD00" style="height: 20px !important;width: 200px !important;" ></a>
1011

1112
---
1213
---
@@ -59,6 +60,7 @@
5960
* [9. To avoid blocking in loop when WiFi is lost](#9-To-avoid-blocking-in-loop-when-wifi-is-lost)
6061
* [9.1 Max times to try WiFi per loop](#91-max-times-to-try-wifi-per-loop)
6162
* [9.2 Interval between reconnection WiFi if lost](#92-interval-between-reconnection-wifi-if-lost)
63+
* [10. Not using Board_Name on Config_Portal](#10-Not-using-Board_Name-on-Config_Portal)
6264
* [Important Notes for using Dynamic Parameters' ids](#important-notes-for-using-dynamic-parameters-ids)
6365
* [Examples](#examples)
6466
* [ 1. Mega_ESP8266Shield](examples/Mega_ESP8266Shield)
@@ -192,16 +194,16 @@ This [**ESP_AT_WM_Lite** library](https://github.com/khoih-prog/ESP_AT_WM_Lite)
192194
## Prerequisites
193195

194196
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
195-
2. [`Arduino AVR core 1.8.3+`](https://github.com/arduino/ArduinoCore-avr) for Arduino (Use Arduino Board Manager) for AVR boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-avr.svg)](https://github.com/arduino/ArduinoCore-avr/releases/latest)
197+
2. [`Arduino AVR core 1.8.5+`](https://github.com/arduino/ArduinoCore-avr) for Arduino (Use Arduino Board Manager) for AVR boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-avr.svg)](https://github.com/arduino/ArduinoCore-avr/releases/latest)
196198
3. [`Arduino Core for STM32 v2.2.0+`](https://github.com/stm32duino/Arduino_Core_STM32) for STM32F/L/H/G/WB/MP1 boards (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.). [![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM32.svg)](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest)
197199
4. [`Teensy core 1.56+`](https://www.pjrc.com/teensy/td_download.html) for Teensy (4.1, 4.0, 3.6, 3.5, 3,2, 3.1, 3.0, LC) boards
198200
5. [`Arduino SAM DUE core v1.6.12+`](https://github.com/arduino/ArduinoCore-sam) for SAM DUE ARM Cortex-M3 boards.
199201
6. [`Arduino SAMD core 1.8.12+`](https://github.com/arduino/ArduinoCore-samd) for SAMD ARM Cortex-M0+ boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-samd.svg)](https://github.com/arduino/ArduinoCore-samd/releases/latest)
200-
7. [`Adafruit SAMD core 1.7.8+`](https://github.com/adafruit/ArduinoCore-samd) for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.). [![GitHub release](https://img.shields.io/github/release/adafruit/ArduinoCore-samd.svg)](https://github.com/adafruit/ArduinoCore-samd/releases/latest)
202+
7. [`Adafruit SAMD core 1.7.9+`](https://github.com/adafruit/ArduinoCore-samd) for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.). [![GitHub release](https://img.shields.io/github/release/adafruit/ArduinoCore-samd.svg)](https://github.com/adafruit/ArduinoCore-samd/releases/latest)
201203
8. [`Seeeduino SAMD core 1.8.2+`](https://github.com/Seeed-Studio/ArduinoCore-samd) for SAMD21/SAMD51 boards (XIAO M0, Wio Terminal, etc.). [![Latest release](https://img.shields.io/github/release/Seeed-Studio/ArduinoCore-samd.svg)](https://github.com/Seeed-Studio/ArduinoCore-samd/releases/latest/)
202204
9. [`Adafruit nRF52 v1.3.0+`](https://github.com/adafruit/Adafruit_nRF52_Arduino) for nRF52 boards such as Adafruit NRF52840_FEATHER, NRF52832_FEATHER, NRF52840_FEATHER_SENSE, NRF52840_ITSYBITSY, NRF52840_CIRCUITPLAY, NRF52840_CLUE, NRF52840_METRO, NRF52840_PCA10056, PARTICLE_XENON, **NINA_B302_ublox**, etc. [![GitHub release](https://img.shields.io/github/release/adafruit/Adafruit_nRF52_Arduino.svg)](https://github.com/adafruit/Adafruit_nRF52_Arduino/releases/latest)
203-
10. [`Arduino mbed_rp2040 core 2.6.1+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino RP2040-based boards, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
204-
11. [`Earle Philhower's arduino-pico core v1.10.0+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
205+
10. [`Arduino mbed_rp2040 core 2.7.2+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino RP2040-based boards, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
206+
11. [`Earle Philhower's arduino-pico core v1.12.0+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
205207
12. [`ESP8266_AT_WebServer library v1.5.3+`](https://github.com/khoih-prog/ESP8266_AT_WebServer) to be able to support ESP32-AT shields. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP8266_AT_WebServer.svg?)](https://www.ardu-badge.com/ESP8266_AT_WebServer)
206208
13. [`FlashStorage_SAMD library v1.3.2+`](https://github.com/khoih-prog/FlashStorage_SAMD) for SAMD21 and SAMD51 boards (ZERO, MKR, NANO_33_IOT, M0, M0 Pro, AdaFruit Itsy-Bitsy M4, etc.). To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/FlashStorage_SAMD.svg?)](https://www.ardu-badge.com/FlashStorage_SAMD)
207209
14. [`FlashStorage_STM32F1 library v1.1.0+`](https://github.com/khoih-prog/FlashStorage_STM32F1) for STM32F1/F3 boards. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/FlashStorage_STM32F1.svg?)](https://www.ardu-badge.com/FlashStorage_STM32F1)
@@ -413,13 +415,13 @@ Whenever the above-mentioned compiler error issue is fixed with the new Arduino
413415
414416
#### 5. For Adafruit SAMD boards
415417
416-
***To be able to compile, run and automatically detect and display BOARD_NAME on Adafruit SAMD (Itsy-Bitsy M4, etc) boards***, you have to copy the whole [Adafruit SAMD Packages_Patches](Packages_Patches/adafruit/hardware/samd/1.7.7) directory into Adafruit samd directory (~/.arduino15/packages/adafruit/hardware/samd/1.7.7).
418+
***To be able to compile, run and automatically detect and display BOARD_NAME on Adafruit SAMD (Itsy-Bitsy M4, etc) boards***, you have to copy the whole [Adafruit SAMD Packages_Patches](Packages_Patches/adafruit/hardware/samd/1.7.9) directory into Adafruit samd directory (~/.arduino15/packages/adafruit/hardware/samd/1.7.9).
417419
418-
Supposing the Adafruit SAMD core version is 1.7.7. This file must be copied into the directory:
420+
Supposing the Adafruit SAMD core version is 1.7.9. This file must be copied into the directory:
419421
420-
- `~/.arduino15/packages/adafruit/hardware/samd/1.7.7/platform.txt`
421-
- `~/.arduino15/packages/adafruit/hardware/samd/1.7.7/cores/arduino/Print.h`
422-
- `~/.arduino15/packages/adafruit/hardware/samd/1.7.7/cores/arduino/Print.cpp`
422+
- `~/.arduino15/packages/adafruit/hardware/samd/1.7.9/platform.txt`
423+
- `~/.arduino15/packages/adafruit/hardware/samd/1.7.9/cores/arduino/Print.h`
424+
- `~/.arduino15/packages/adafruit/hardware/samd/1.7.9/cores/arduino/Print.cpp`
423425
424426
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz
425427
This file must be copied into the directory:
@@ -521,12 +523,12 @@ With core after v1.5.0, this step is not necessary anymore thanks to the PR [Add
521523
522524
#### 9. For Portenta_H7 boards using Arduino IDE in Linux
523525
524-
**To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.)**, you have to copy the file [portenta_post_install.sh](Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh) into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh).
526+
**To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.)**, you have to copy the file [portenta_post_install.sh](Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh) into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh).
525527
526528
Then run the following command using `sudo`
527529
528530
```
529-
$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/2.6.1
531+
$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/2.7.2
530532
$ chmod 755 portenta_post_install.sh
531533
$ sudo ./portenta_post_install.sh
532534
```
@@ -539,9 +541,9 @@ This will create the file `/etc/udev/rules.d/49-portenta_h7.rules` as follows:
539541
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="035b", GROUP="plugdev", MODE="0666"
540542
```
541543
542-
Supposing the ArduinoCore-mbed core version is 2.6.1. Now only one file must be copied into the directory:
544+
Supposing the ArduinoCore-mbed core version is 2.7.2. Now only one file must be copied into the directory:
543545
544-
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh`
546+
- `~/.arduino15/packages/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh`
545547
546548
Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz
547549
@@ -781,6 +783,13 @@ Check [retries block the main loop #18](https://github.com/khoih-prog/WiFiManage
781783
#define WIFI_RECON_INTERVAL 30000 // 30s
782784
```
783785

786+
787+
#### 10. Not using Board_Name on Config_Portal
788+
789+
Default is `true`. Just change to `false` to not using `Board_Name` on Config_Portal
790+
791+
792+
784793
---
785794
---
786795

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
## Table of Contents
1313

1414
* [Changelog](#changelog)
15+
* [Release v1.5.2](#release-v152)
1516
* [Release v1.5.1](#release-v151)
1617
* [Release v1.5.0](#release-v150)
1718
* [Release v1.4.1](#release-v141)
@@ -29,6 +30,13 @@
2930

3031
## Changelog
3132

33+
### Release v1.5.2
34+
35+
1. Optimize code by using passing by `reference` instead of by `value`
36+
2. Optional `Board_Name` in Menu. Check [option to remove board name from web page #25](https://github.com/khoih-prog/WiFiManager_NINA_Lite/issues/25)
37+
3. Add function `isConfigMode()` to signal system is in Config Portal mode.
38+
4. Update `Packages' Patches`
39+
3240
### Release v1.5.1
3341

3442
1. Update to be compatible with new `FlashStorage_SAMD`

examples/Mega_ESP8266Shield/Mega_ESP8266Shield.ino

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,22 @@ void heartBeatPrint()
2020
{
2121
static int num = 1;
2222

23+
if (ESP_AT_WiFiManager->getWiFiStatus())
24+
Serial.print("H"); // H means connected to WiFi
25+
else
26+
{
27+
if (ESP_AT_WiFiManager->isConfigMode())
28+
Serial.print("C"); // C means in Config Mode
29+
else
30+
Serial.print("F"); // F means not connected to WiFi
31+
}
32+
33+
#if 0
2334
if (WiFi.status() == WL_CONNECTED)
2435
Serial.print(F("H")); // H means connected to WiFi
2536
else
2637
Serial.print(F("F")); // F means not connected to WiFi
38+
#endif
2739

2840
if (num == 80)
2941
{

examples/Mega_ESP8266Shield/defines.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,28 @@
7272

7373
/////////////////////////////////////////////
7474

75+
// Optional, to use Board Name in Menu
76+
#define USING_BOARD_NAME false //true
77+
78+
/////////////////////////////////////////////
79+
80+
// Optional, to use Board Name in Menu
81+
#define USING_CONFIG_MODE_LED true
82+
83+
#if USING_CONFIG_MODE_LED
84+
#if defined(LED_BUILTIN)
85+
#define CONFIG_MODE_LED LED_BUILTIN
86+
#else
87+
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
88+
#define CONFIG_MODE_LED 13
89+
#endif
90+
91+
#define LED_ON HIGH
92+
#define LED_OFF LOW
93+
#endif
94+
95+
/////////////////////////////////////////////
96+
7597
#include <Esp8266_AT_WM_Lite.h>
7698

7799
#define HOST_NAME "Mega-ESP_AT"

examples/RPi_Pico_ESP8266Shield/RPi_Pico_ESP8266Shield.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ void heartBeatPrint()
2323
if (ESP_AT_WiFiManager->getWiFiStatus())
2424
Serial.print("H"); // H means connected to WiFi
2525
else
26-
Serial.print("F"); // F means not connected to WiFi
26+
{
27+
if (ESP_AT_WiFiManager->isConfigMode())
28+
Serial.print("C"); // C means in Config Mode
29+
else
30+
Serial.print("F"); // F means not connected to WiFi
31+
}
2732

2833
if (num == 80)
2934
{

examples/RPi_Pico_ESP8266Shield/defines.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,28 @@
125125

126126
/////////////////////////////////////////////
127127

128+
// Optional, to use Board Name in Menu
129+
#define USING_BOARD_NAME false //true
130+
131+
/////////////////////////////////////////////
132+
133+
// Optional, to use Board Name in Menu
134+
#define USING_CONFIG_MODE_LED true
135+
136+
#if USING_CONFIG_MODE_LED
137+
#if defined(LED_BUILTIN)
138+
#define CONFIG_MODE_LED LED_BUILTIN
139+
#else
140+
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
141+
#define CONFIG_MODE_LED 13
142+
#endif
143+
144+
#define LED_ON HIGH
145+
#define LED_OFF LOW
146+
#endif
147+
148+
/////////////////////////////////////////////
149+
128150
#if ESP8266_AT_USE_RP2040
129151

130152
#include <Esp8266_AT_WM_Lite_RPi_Pico.h>

examples/SAMD_ESP8266Shield/SAMD_ESP8266Shield.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ void heartBeatPrint()
2323
if (ESP_AT_WiFiManager->getWiFiStatus())
2424
Serial.print("H"); // H means connected to WiFi
2525
else
26-
Serial.print("F"); // F means not connected to WiFi
26+
{
27+
if (ESP_AT_WiFiManager->isConfigMode())
28+
Serial.print("C"); // C means in Config Mode
29+
else
30+
Serial.print("F"); // F means not connected to WiFi
31+
}
2732

2833
if (num == 80)
2934
{

examples/SAMD_ESP8266Shield/defines.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,28 @@
134134

135135
/////////////////////////////////////////////
136136

137+
// Optional, to use Board Name in Menu
138+
#define USING_BOARD_NAME false //true
139+
140+
/////////////////////////////////////////////
141+
142+
// Optional, to use Board Name in Menu
143+
#define USING_CONFIG_MODE_LED true
144+
145+
#if USING_CONFIG_MODE_LED
146+
#if defined(LED_BUILTIN)
147+
#define CONFIG_MODE_LED LED_BUILTIN
148+
#else
149+
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
150+
#define CONFIG_MODE_LED 13
151+
#endif
152+
153+
#define LED_ON HIGH
154+
#define LED_OFF LOW
155+
#endif
156+
157+
/////////////////////////////////////////////
158+
137159
#include <Esp8266_AT_WM_Lite_SAMD.h>
138160

139161
#define HOST_NAME "SAMD_ESP_AT"

examples/SAM_DUE_ESP8266Shield/SAM_DUE_ESP8266Shield.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ void heartBeatPrint()
2323
if (ESP_AT_WiFiManager->getWiFiStatus())
2424
Serial.print("H"); // H means connected to WiFi
2525
else
26-
Serial.print("F"); // F means not connected to WiFi
26+
{
27+
if (ESP_AT_WiFiManager->isConfigMode())
28+
Serial.print("C"); // C means in Config Mode
29+
else
30+
Serial.print("F"); // F means not connected to WiFi
31+
}
2732

2833
if (num == 80)
2934
{

examples/SAM_DUE_ESP8266Shield/defines.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,28 @@
9292

9393
/////////////////////////////////////////////
9494

95+
// Optional, to use Board Name in Menu
96+
#define USING_BOARD_NAME false //true
97+
98+
/////////////////////////////////////////////
99+
100+
// Optional, to use Board Name in Menu
101+
#define USING_CONFIG_MODE_LED true
102+
103+
#if USING_CONFIG_MODE_LED
104+
#if defined(LED_BUILTIN)
105+
#define CONFIG_MODE_LED LED_BUILTIN
106+
#else
107+
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
108+
#define CONFIG_MODE_LED 13
109+
#endif
110+
111+
#define LED_ON HIGH
112+
#define LED_OFF LOW
113+
#endif
114+
115+
/////////////////////////////////////////////
116+
95117
#include <Esp8266_AT_WM_Lite_DUE.h>
96118

97119
#define HOST_NAME "SAM_DUE-ESP_AT"

examples/STM32_ESP8266Shield/STM32_ESP8266Shield.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ void heartBeatPrint()
2323
if (ESP_AT_WiFiManager->getWiFiStatus())
2424
Serial.print("H"); // H means connected to WiFi
2525
else
26-
Serial.print("F"); // F means not connected to WiFi
26+
{
27+
if (ESP_AT_WiFiManager->isConfigMode())
28+
Serial.print("C"); // C means in Config Mode
29+
else
30+
Serial.print("F"); // F means not connected to WiFi
31+
}
2732

2833
if (num == 80)
2934
{

examples/STM32_ESP8266Shield/defines.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,28 @@
156156

157157
/////////////////////////////////////////////
158158

159+
// Optional, to use Board Name in Menu
160+
#define USING_BOARD_NAME false //true
161+
162+
/////////////////////////////////////////////
163+
164+
// Optional, to use Board Name in Menu
165+
#define USING_CONFIG_MODE_LED true
166+
167+
#if USING_CONFIG_MODE_LED
168+
#if defined(LED_BUILTIN)
169+
#define CONFIG_MODE_LED LED_BUILTIN
170+
#else
171+
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
172+
#define CONFIG_MODE_LED 13
173+
#endif
174+
175+
#define LED_ON HIGH
176+
#define LED_OFF LOW
177+
#endif
178+
179+
/////////////////////////////////////////////
180+
159181
#include <Esp8266_AT_WM_Lite_STM32.h>
160182

161183

examples/nRF52_ESP8266Shield/defines.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,28 @@
113113

114114
/////////////////////////////////////////////
115115

116+
// Optional, to use Board Name in Menu
117+
#define USING_BOARD_NAME false //true
118+
119+
/////////////////////////////////////////////
120+
121+
// Optional, to use Board Name in Menu
122+
#define USING_CONFIG_MODE_LED true
123+
124+
#if USING_CONFIG_MODE_LED
125+
#if defined(LED_BUILTIN)
126+
#define CONFIG_MODE_LED LED_BUILTIN
127+
#else
128+
// Using default pin 13 for CONFIG_MODE_LED. To be changed as necessary
129+
#define CONFIG_MODE_LED 13
130+
#endif
131+
132+
#define LED_ON HIGH
133+
#define LED_OFF LOW
134+
#endif
135+
136+
/////////////////////////////////////////////
137+
116138
#include <Esp8266_AT_WM_Lite_nRF52.h>
117139

118140
#define HOST_NAME "nRF52-ESP_AT"

0 commit comments

Comments
 (0)