|
15 | 15 | The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers |
16 | 16 | Therefore, their executions are not blocked by bad-behaving functions / tasks. |
17 | 17 | This important feature is absolutely necessary for mission-critical tasks. |
18 | | -
|
19 | | - Loosely based on SimpleTimer - A timer library for Arduino. |
20 | | - Author: mromani@ottotecnica.com |
21 | | - Copyright (c) 2010 OTTOTECNICA Italy |
22 | | -
|
23 | | - Based on BlynkTimer.h |
24 | | - Author: Volodymyr Shymanskyy |
25 | | - |
26 | | - The ESP8266 timers are badly designed, using only 23-bit counter along with maximum 256 prescaler. They're only better than UNO / Mega. |
27 | | - The ESP8266 has two hardware timers, but timer0 has been used for WiFi and it's not advisable to use. Only timer1 is available. |
28 | | - The timer1's 23-bit counter terribly can count only up to 8,388,607. So the timer1 maximum interval is very short. |
29 | | - Using 256 prescaler, maximum timer1 interval is only 26.843542 seconds !!! |
30 | | -
|
31 | | - Version: 1.2.0 |
32 | | -
|
33 | | - Version Modified By Date Comments |
34 | | - ------- ----------- ---------- ----------- |
35 | | - 1.0.0 K Hoang 04/12/2019 Initial coding |
36 | | - 1.0.1 K Hoang 05/12/2019 Add more features getPosition and getPulseWidth. Optimize. |
37 | | - 1.0.2 K Hoang 20/12/2019 Add more Blynk examples.Change example names to avoid duplication. |
38 | | - 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 |
40 | 18 | *****************************************************************************************************************************/ |
41 | 19 |
|
42 | 20 | /**************************************************************************************************************************** |
|
81 | 59 | *****************************************************************************************************************************/ |
82 | 60 |
|
83 | 61 | #ifndef ESP8266 |
84 | | - #error This code is designed to run on ESP8266 platform, not Arduino nor ESP32! Please check your Tools->Board setting. |
| 62 | + #error This code is designed to run on ESP8266 platform! Please check your Tools->Board setting. |
85 | 63 | #endif |
86 | 64 |
|
87 | 65 | #define TIMER_INTERRUPT_DEBUG 1 |
88 | 66 | #define ISR_SERVO_DEBUG 1 |
89 | 67 |
|
| 68 | +// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error |
90 | 69 | #include "ESP8266_ISR_Servo.h" |
91 | 70 |
|
92 | 71 | // Published values for SG90 servos; adjust if needed |
|
0 commit comments