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

Commit 2c3dfcc

Browse files
authored
v1.2.0 to match new ESP8266 core v3.0.0
### Releases v1.2.0 1. Update to match new ESP8266 core v3.0.0
1 parent 35ebf29 commit 2c3dfcc

File tree

17 files changed

+147
-168
lines changed

17 files changed

+147
-168
lines changed

CONTRIBUTING.md

Lines changed: 3 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.13) or Platform.io version
18-
* `ESP8266` Core Version (e.g. ESP8266 core v2.7.4)
18+
* `ESP8266` Core Version (e.g. ESP8266 core v3.0.0)
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:
@@ -27,9 +27,9 @@ Please ensure to specify the following:
2727

2828
```
2929
Arduino IDE version: 1.8.13
30-
ESP8266 Core Version 2.7.4
30+
ESP8266 Core Version v3.0.0
3131
OS: Ubuntu 20.04 LTS
32-
Linux Inspiron 5.4.0-54-generic #60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
32+
Linux Inspiron 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 a crash while trying to use the Timer Interrupt.

README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [Important Notes about using ISR](#important-notes-about-using-isr)
1717
* [Currently supported Boards](#currently-supported-boards)
1818
* [Changelog](#changelog)
19+
* [Releases v1.2.0](#releases-v120)
1920
* [Releases v1.1.0](#releases-v110)
2021
* [Releases v1.0.2](#releases-v102)
2122
* [Releases v1.0.1](#releases-v101)
@@ -100,6 +101,10 @@ This [**ESP8266_ISR_Servo** library](https://github.com/khoih-prog/ESP8266_ISR_S
100101

101102
## Changelog
102103

104+
### Releases v1.2.0
105+
106+
1. Update to match new ESP8266 core v3.0.0
107+
103108
### Releases v1.1.0
104109

105110
1. Fix bug. See [Fixed count >= min comparison for servo enable](https://github.com/khoih-prog/ESP32_ISR_Servo/pull/1)
@@ -124,7 +129,9 @@ This [**ESP8266_ISR_Servo** library](https://github.com/khoih-prog/ESP8266_ISR_S
124129
## Prerequisites
125130

126131
1. [`Arduino IDE 1.8.13+`](https://www.arduino.cc/en/Main/Software)
127-
2. [`ESP8266 core 2.7.4+`](https://github.com/esp8266/Arduino#installing-with-boards-manager) for ESP8266 boards.
132+
2. [`ESP8266 Core 3.0.0+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/). To use ESP8266 core 2.7.1+ for LittleFS.
133+
3. [`Blynk_WM library v1.5.0+`](https://github.com/khoih-prog/Blynk_WM) to use with some examples. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/Blynk_WM.svg?)](https://www.ardu-badge.com/Blynk_WM).
134+
4. [`ESP_DoubleResetDetector library v1.1.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) to use with some examples. To install. check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector).
128135

129136
---
130137

@@ -459,10 +466,10 @@ void loop()
459466
460467
461468
```
462-
Starting ESP8266_BlynkServoControl using LITTLEFS with SSL on ESP8266_NODEMCU
463-
Blynk_WM v1.1.0
469+
Starting ESP8266_BlynkServoControl using LITTLEFS with SSL on ESP8266_NODEMCU_ESP12E
470+
Blynk_WM v1.5.0
464471
ESP_DoubleResetDetector v1.1.1
465-
ESP8266_ISR_Servo v1.1.0
472+
ESP8266_ISR_Servo v1.2.0
466473
[290] Hostname=8266-Master-Controller
467474
[309] LoadCfgFile
468475
[309] OK
@@ -487,7 +494,7 @@ ESP8266_ISR_Servo v1.1.0
487494
/ _ )/ /_ _____ / /__
488495
/ _ / / // / _ \/ '_/
489496
/____/_/\_, /_//_/_/\_\
490-
/___/ v0.6.1 on NodeMCU
497+
/___/ v0.6.1 on ESP8266_NODEMCU_ESP12E
491498

492499
[22618] NTP time: Sun Jan 3 07:08:22 2021
493500
[22619] BlynkArduinoClient.connect: Connecting to account.duckdns.org:9443
@@ -503,11 +510,11 @@ Setup Servo3 OK
503510
```
504511
---
505512
506-
### 2. ESP8266_MultipleRandomServos on ESP8266_NODEMCU
513+
### 2. ESP8266_MultipleRandomServos on ESP8266_NODEMCU_ESP12E
507514
508515
```
509-
Starting ESP8266_MultipleRandomServos on ESP8266_NODEMCU
510-
ESP8266_ISR_Servo v1.1.0
516+
Starting ESP8266_MultipleRandomServos on ESP8266_NODEMCU_ESP12E
517+
ESP8266_ISR_Servo v1.2.0
511518
[ISR_SERVO] ESP8266FastTimerInterrupt: _fre = 5000000.00 , _count = 50
512519
[ISR_SERVO] Starting ITimer OK
513520
Setup OK Servo index = 0
@@ -606,12 +613,12 @@ Servos idx = 5, act. pos. (deg) = [ISR_SERVO] Idx = 5
606613
607614
---
608615
609-
### 3. ESP8266_ISR_MultiServos on ESP8266_NODEMCU
616+
### 3. ESP8266_ISR_MultiServos on ESP8266_NODEMCU_ESP12E
610617
611618
612619
```
613-
Starting ESP8266_ISR_MultiServos on ESP8266_NODEMCU
614-
ESP8266_ISR_Servo v1.1.0
620+
Starting ESP8266_ISR_MultiServos on ESP8266_NODEMCU_ESP12E
621+
ESP8266_ISR_Servo v1.2.0
615622
[ISR_SERVO] ESP8266FastTimerInterrupt: _fre = 5000000.00 , _count = 50
616623
[ISR_SERVO] Starting ITimer OK
617624
Setup Servo1 OK
@@ -678,6 +685,10 @@ Sometimes, the library will only work if you update the board core to the latest
678685

679686
## Releases
680687

688+
### Releases v1.2.0
689+
690+
1. Update to match new ESP8266 core v3.0.0
691+
681692
### Releases v1.1.0
682693

683694
1. Fix bug. See [Fixed count >= min comparison for servo enable](https://github.com/khoih-prog/ESP32_ISR_Servo/pull/1)
@@ -716,6 +727,7 @@ Submit issues to: [ESP8266_ISR_Servo issues](https://github.com/khoih-prog/ESP82
716727
2. Add functions `getPosition()` and `getPulseWidth()`
717728
3. Optimize the code
718729
4. Add more complicated examples
730+
5. Update to match new ESP8266 core v3.0.0
719731

720732
---
721733
---

examples/ESP8266_BlynkServoControl/Credentials.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,11 @@
2525
if the interrupt changes a multi-byte variable between a sequence of instructions, it can be read incorrectly.
2626
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2727
or the entire sequence of your code which accesses the data.
28-
29-
Version: 1.1.0
30-
28+
3129
The ESP8266 timers are badly designed, using only 23-bit counter along with maximum 256 prescaler. They're only better than UNO / Mega.
3230
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
3331
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
3432
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
35-
36-
Version Modified By Date Comments
37-
------- ----------- ---------- -----------
38-
1.0.0 K Hoang 04/12/2019 Initial coding
39-
1.0.1 K Hoang 05/12/2019 Add more features getPosition and getPulseWidth. Optimize.
40-
1.0.2 K Hoang 20/12/2019 Add more Blynk examples.Change example names to avoid duplication.
41-
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
4233
*****************************************************************************************************************************/
4334

4435
#ifndef Credentials_h

examples/ESP8266_BlynkServoControl/ESP8266_BlynkServoControl.ino

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,33 @@
1010
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
1111
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
1212
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
13-
14-
Now these new 16 ISR-based PWM servo contro uses only 1 hardware timer.
13+
14+
Now with these new 16 ISR-based timers, the maximum interval is practically unlimited (limited only by unsigned long miliseconds)
1515
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
1616
Therefore, their executions are not blocked by bad-behaving functions / tasks.
1717
This important feature is absolutely necessary for mission-critical tasks.
18-
19-
Notes:
20-
Special design is necessary to share data between interrupt code and the rest of your program.
21-
Variables usually need to be "volatile" types. Volatile tells the compiler to avoid optimizations that assume
22-
variable can not spontaneously change. Because your function may change variables while your program is using them,
23-
the compiler needs this hint. But volatile alone is often not enough.
24-
When accessing shared variables, usually interrupts must be disabled. Even with volatile,
25-
if the interrupt changes a multi-byte variable between a sequence of instructions, it can be read incorrectly.
26-
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
27-
or the entire sequence of your code which accesses the data.
28-
29-
Version: 1.1.0
18+
19+
Loosely based on SimpleTimer - A timer library for Arduino.
20+
21+
Copyright (c) 2010 OTTOTECNICA Italy
22+
23+
Based on BlynkTimer.h
24+
Author: Volodymyr Shymanskyy
3025
3126
The ESP8266 timers are badly designed, using only 23-bit counter along with maximum 256 prescaler. They're only better than UNO / Mega.
3227
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
3328
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
3429
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
35-
30+
31+
Version: 1.2.0
32+
3633
Version Modified By Date Comments
3734
------- ----------- ---------- -----------
3835
1.0.0 K Hoang 04/12/2019 Initial coding
3936
1.0.1 K Hoang 05/12/2019 Add more features getPosition and getPulseWidth. Optimize.
4037
1.0.2 K Hoang 20/12/2019 Add more Blynk examples.Change example names to avoid duplication.
4138
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
39+
1.2.0 K Hoang 18/05/2021 Update to match new ESP8266 core v3.0.0
4240
*****************************************************************************************************************************/
4341

4442
/****************************************************************************************************************************

examples/ESP8266_BlynkServoControl/defines.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,10 @@
2626
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2727
or the entire sequence of your code which accesses the data.
2828
29-
Version: 1.1.0
30-
3129
The ESP8266 timers are badly designed, using only 23-bit counter along with maximum 256 prescaler. They're only better than UNO / Mega.
3230
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
3331
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
3432
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
35-
36-
Version Modified By Date Comments
37-
------- ----------- ---------- -----------
38-
1.0.0 K Hoang 04/12/2019 Initial coding
39-
1.0.1 K Hoang 05/12/2019 Add more features getPosition and getPulseWidth. Optimize.
40-
1.0.2 K Hoang 20/12/2019 Add more Blynk examples.Change example names to avoid duplication.
41-
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
4233
*****************************************************************************************************************************/
4334

4435
#ifndef defines_h
@@ -90,8 +81,8 @@
9081
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
9182
// Those above #define's must be placed before #include <BlynkSimpleEsp8266_WM.h>
9283

93-
#define USE_SSL true
94-
//#define USE_SSL false
84+
//#define USE_SSL true
85+
#define USE_SSL false
9586

9687
#if USE_SSL
9788
#include <BlynkSimpleEsp8266_SSL_WM.h>

examples/ESP8266_BlynkServoControl/dynamicParams.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,10 @@
2626
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
2727
or the entire sequence of your code which accesses the data.
2828
29-
Version: 1.1.0
30-
3129
The ESP8266 timers are badly designed, using only 23-bit counter along with maximum 256 prescaler. They're only better than UNO / Mega.
3230
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
3331
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
3432
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
35-
36-
Version Modified By Date Comments
37-
------- ----------- ---------- -----------
38-
1.0.0 K Hoang 04/12/2019 Initial coding
39-
1.0.1 K Hoang 05/12/2019 Add more features getPosition and getPulseWidth. Optimize.
40-
1.0.2 K Hoang 20/12/2019 Add more Blynk examples.Change example names to avoid duplication.
41-
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
4233
*****************************************************************************************************************************/
4334

4435
#ifndef dynamicParams_h

examples/ESP8266_ISR_MultiServos/ESP8266_ISR_MultiServos.ino

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,33 @@
1010
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
1111
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
1212
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
13-
14-
Now these new 16 ISR-based PWM servo contro uses only 1 hardware timer.
13+
14+
Now with these new 16 ISR-based timers, the maximum interval is practically unlimited (limited only by unsigned long miliseconds)
1515
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
1616
Therefore, their executions are not blocked by bad-behaving functions / tasks.
1717
This important feature is absolutely necessary for mission-critical tasks.
18-
19-
Notes:
20-
Special design is necessary to share data between interrupt code and the rest of your program.
21-
Variables usually need to be "volatile" types. Volatile tells the compiler to avoid optimizations that assume
22-
variable can not spontaneously change. Because your function may change variables while your program is using them,
23-
the compiler needs this hint. But volatile alone is often not enough.
24-
When accessing shared variables, usually interrupts must be disabled. Even with volatile,
25-
if the interrupt changes a multi-byte variable between a sequence of instructions, it can be read incorrectly.
26-
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
27-
or the entire sequence of your code which accesses the data.
28-
29-
Version: 1.1.0
18+
19+
Loosely based on SimpleTimer - A timer library for Arduino.
20+
21+
Copyright (c) 2010 OTTOTECNICA Italy
22+
23+
Based on BlynkTimer.h
24+
Author: Volodymyr Shymanskyy
3025
3126
The ESP8266 timers are badly designed, using only 23-bit counter along with maximum 256 prescaler. They're only better than UNO / Mega.
3227
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
3328
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
3429
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
35-
30+
31+
Version: 1.2.0
32+
3633
Version Modified By Date Comments
3734
------- ----------- ---------- -----------
3835
1.0.0 K Hoang 04/12/2019 Initial coding
3936
1.0.1 K Hoang 05/12/2019 Add more features getPosition and getPulseWidth. Optimize.
4037
1.0.2 K Hoang 20/12/2019 Add more Blynk examples.Change example names to avoid duplication.
4138
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
39+
1.2.0 K Hoang 18/05/2021 Update to match new ESP8266 core v3.0.0
4240
*****************************************************************************************************************************/
4341

4442
/****************************************************************************************************************************

examples/ESP8266_MultipleRandomServos/ESP8266_MultipleRandomServos.ino

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,33 @@
1010
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
1111
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
1212
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
13-
14-
Now these new 16 ISR-based PWM servo contro uses only 1 hardware timer.
13+
14+
Now with these new 16 ISR-based timers, the maximum interval is practically unlimited (limited only by unsigned long miliseconds)
1515
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
1616
Therefore, their executions are not blocked by bad-behaving functions / tasks.
1717
This important feature is absolutely necessary for mission-critical tasks.
18-
19-
Notes:
20-
Special design is necessary to share data between interrupt code and the rest of your program.
21-
Variables usually need to be "volatile" types. Volatile tells the compiler to avoid optimizations that assume
22-
variable can not spontaneously change. Because your function may change variables while your program is using them,
23-
the compiler needs this hint. But volatile alone is often not enough.
24-
When accessing shared variables, usually interrupts must be disabled. Even with volatile,
25-
if the interrupt changes a multi-byte variable between a sequence of instructions, it can be read incorrectly.
26-
If your data is multiple variables, such as an array and a count, usually interrupts need to be disabled
27-
or the entire sequence of your code which accesses the data.
28-
29-
Version: 1.1.0
18+
19+
Loosely based on SimpleTimer - A timer library for Arduino.
20+
21+
Copyright (c) 2010 OTTOTECNICA Italy
22+
23+
Based on BlynkTimer.h
24+
Author: Volodymyr Shymanskyy
3025
3126
The ESP8266 timers are badly designed, using only 23-bit counter along with maximum 256 prescaler. They're only better than UNO / Mega.
3227
The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available.
3328
The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short.
3429
Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!!
35-
30+
31+
Version: 1.2.0
32+
3633
Version Modified By Date Comments
3734
------- ----------- ---------- -----------
3835
1.0.0 K Hoang 04/12/2019 Initial coding
3936
1.0.1 K Hoang 05/12/2019 Add more features getPosition and getPulseWidth. Optimize.
4037
1.0.2 K Hoang 20/12/2019 Add more Blynk examples.Change example names to avoid duplication.
4138
1.1.0 K Hoang 03/01/2021 Fix bug. Add TOC and Version String.
39+
1.2.0 K Hoang 18/05/2021 Update to match new ESP8266 core v3.0.0
4240
*****************************************************************************************************************************/
4341

4442
/****************************************************************************************************************************

0 commit comments

Comments
 (0)