You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
### Releases v1.4.0
1. Add support to **Adafruit AVR ATMEGA_32U4** such as **AVR_FLORA8, AVR_FEATHER32U4, etc.**
2. Add support to **Adafruit AVR ATMEGA_328(P)** such as **AVR_FEATHER328P, AVR_METRO, etc.**
3. Update examples
*[Important Notes about ISR](#important-notes-about-isr)
18
18
*[Changelog](#changelog)
19
+
*[Releases v1.4.0](#releases-v140)
19
20
*[Releases v1.3.0](#releases-v130)
20
21
*[Releases v1.2.0](#releases-v120)
21
22
*[Releases v1.1.2](#releases-v112)
@@ -82,7 +83,7 @@
82
83
83
84
### Features
84
85
85
-
This library enables you to use Interrupt from Hardware Timers on an Arduino AVR board, such as Nano, UNO, Mega, etc.
86
+
This library enables you to use Interrupt from Hardware Timers on an Arduino or Adafruit AVR board, such as Nano, UNO, Mega, AVR_FEATHER32U4, etc.
86
87
87
88
As **Hardware Timers are rare, and very precious assets** of any board, this library now enables you to use up to **16 ISR-based Timers, while consuming only 1 Hardware Timer**. Timers' interval is very long (**ulong millisecs**).
88
89
@@ -126,18 +127,21 @@ The catch is your function is now part of an ISR (Interrupt Service Routine), an
126
127
### Currently supported Boards
127
128
128
129
- Arduino Uno / Mega / Duemilanove / Diecimila / LilyPad / Mini / Fio / Nano, etc.
129
-
- Sanguino
130
-
- ATmega8, 48, 88, 168, 328
131
-
- ATmega8535, 16, 32, 164, 324, 644, 1284,
132
-
- ATmega64, 128
133
-
- ATtiny 84 / 85
134
-
-**ATMega 16U4, 32U4** such as AVR Leonardo, Leonardo ETH, YUN, Esplora, LILYPAD_USB, AVR_ROBOT_CONTROL, AVR_ROBOT_MOTOR, AVR_INDUSTRIAL101, etc.
130
+
-**Arduino ATMega 16U4, 32U4** such as AVR Leonardo, Leonardo ETH, YUN, Esplora, LILYPAD_USB, AVR_ROBOT_CONTROL, AVR_ROBOT_MOTOR, AVR_INDUSTRIAL101, etc.
131
+
-**Adafruit ATMega 32U4** such as AVR_FLORA8, AVR_FEATHER32U4, AVR_CIRCUITPLAY, AVR_ITSYBITSY32U4_5V, AVR_ITSYBITSY32U4_3V, AVR_BLUEFRUITMICRO, AVR_ADAFRUIT32U4, etc.
132
+
-**Adafruit ATMega 328(P)** such as AVR_METRO, AVR_FEATHER328P, AVR_PROTRINKET5, AVR_PROTRINKET3, AVR_PROTRINKET5FTDI, AVR_PROTRINKET3FTDI, etc.
135
133
136
134
---
137
135
---
138
136
139
137
## Changelog
140
138
139
+
### Releases v1.4.0
140
+
141
+
1. Add support to **Adafruit AVR ATMEGA_32U4** such as **AVR_FLORA8, AVR_FEATHER32U4, etc.**
142
+
2. Add support to **Adafruit AVR ATMEGA_328(P)** such as **AVR_FEATHER328P, AVR_METRO, etc.**
143
+
3. Update examples
144
+
141
145
### Releases v1.3.0
142
146
143
147
1. Add support to **AVR ATMEGA_16U4, ATMEGA_32U4** such as **Leonardo, YUN, ESPLORA, etc.**
@@ -177,6 +181,7 @@ The catch is your function is now part of an ISR (Interrupt Service Routine), an
177
181
178
182
1.[`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
179
183
2.[`Arduino AVR core 1.8.3+`](https://github.com/arduino/ArduinoCore-avr) for Arduino AVR boards. Use Arduino Board Manager to install. [](https://github.com/arduino/ArduinoCore-avr/releases/latest/)
184
+
3.[`Adafruit AVR core 1.4.13+`](https://github.com/adafruit/Adafruit_Arduino_Boards) for Adafruit AVR boards. Use Arduino Board Manager to install.
180
185
181
186
---
182
187
---
@@ -279,15 +284,11 @@ Before using any Timer, you have to make sure the Timer has not been used by any
279
284
280
285
```
281
286
// Select the timers you're using, here ITimer1
282
-
#if ( TIMER_INTERRUPT_USING_ATMEGA_32U4 )
283
-
#define USE_TIMER_1 true
284
-
#else
285
-
#define USE_TIMER_1 true
286
-
#define USE_TIMER_2 false
287
-
#define USE_TIMER_3 false
288
-
#define USE_TIMER_4 false
289
-
#define USE_TIMER_5 false
290
-
#endif
287
+
#define USE_TIMER_1 true
288
+
#define USE_TIMER_2 false
289
+
#define USE_TIMER_3 false
290
+
#define USE_TIMER_4 false
291
+
#define USE_TIMER_5 false
291
292
292
293
// Init timer ITimer1
293
294
ITimer1.init();
@@ -383,15 +384,11 @@ The 16 ISR_based Timers, designed for long timer intervals, only support using *
383
384
### 2.2 Init Hardware Timer and ISR-based Timer
384
385
385
386
```
386
-
#if ( TIMER_INTERRUPT_USING_ATMEGA_32U4 )
387
-
#define USE_TIMER_1 true
388
-
#else
389
-
#define USE_TIMER_1 true
390
-
#define USE_TIMER_2 false
391
-
#define USE_TIMER_3 false
392
-
#define USE_TIMER_4 false
393
-
#define USE_TIMER_5 false
394
-
#endif
387
+
#define USE_TIMER_1 true
388
+
#define USE_TIMER_2 false
389
+
#define USE_TIMER_3 false
390
+
#define USE_TIMER_4 false
391
+
#define USE_TIMER_5 false
395
392
396
393
// Init ISR_Timer
397
394
// Each ISR_Timer can service 16 different ISR-based timers
@@ -485,41 +482,17 @@ void setup()
485
482
### Example [ISR_16_Timers_Array_Complex](examples/ISR_16_Timers_Array_Complex)
#warning Using ATMega32U4, such as Leonardo or Leonardo ETH. Only Timer1 is available
502
-
#elif defined(ARDUINO_AVR_GEMMA)
503
-
#error These AVR boards are not supported! You can use Software Serial. Please check your Tools->Board setting.
504
-
#else
505
-
#error This is designed only for Arduino AVR board! Please check your Tools->Board setting.
506
-
#endif
507
-
508
485
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
509
486
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
510
487
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
511
488
#defineTIMER_INTERRUPT_DEBUG 0
512
489
#define_TIMERINTERRUPT_LOGLEVEL_ 0
513
490
514
-
#if ( TIMER_INTERRUPT_USING_ATMEGA_32U4 )
515
-
#define USE_TIMER_1 true
516
-
#else
517
-
#define USE_TIMER_1 true
518
-
#define USE_TIMER_2 false
519
-
#define USE_TIMER_3 false
520
-
#define USE_TIMER_4 false
521
-
#define USE_TIMER_5 false
522
-
#endif
491
+
#defineUSE_TIMER_1 true
492
+
#defineUSE_TIMER_2 false
493
+
#defineUSE_TIMER_3 false
494
+
#defineUSE_TIMER_4 false
495
+
#defineUSE_TIMER_5 false
523
496
524
497
#include"TimerInterrupt.h"
525
498
#include"ISR_Timer.h"
@@ -840,7 +813,7 @@ While software timer, **programmed for 2s, is activated after more than 10.000s
840
813
841
814
```
842
815
Starting ISR_16_Timers_Array_Complex on AVR
843
-
TimerInterrupt v1.3.0
816
+
TimerInterrupt v1.4.0
844
817
CPU Frequency = 16 MHz
845
818
Starting ITimer2 OK, millis() = 1
846
819
SimpleTimer : 2, ms : 10007, Dms : 10007
@@ -990,7 +963,7 @@ The following is the sample terminal output when running example [Change_Interva
990
963
991
964
```
992
965
Starting Change_Interval on AVR
993
-
TimerInterrupt v1.3.0
966
+
TimerInterrupt v1.4.0
994
967
CPU Frequency = 16 MHz
995
968
Starting ITimer1 OK, millis() = 1
996
969
Starting ITimer2 OK, millis() = 4
@@ -1020,8 +993,10 @@ You can also change the debugging level from 0 to 3
1020
993
1021
994
```cpp
1022
995
// These define's must be placed at the beginning before #include "TimerInterrupt.h"
1023
-
// Don't define TIMER_INTERRUPT_DEBUG > 0. Only for special ISR debugging only. Can hang the system.
1024
-
#define TIMER_INTERRUPT_DEBUG 0
996
+
// _TIMERINTERRUPT_LOGLEVEL_ from 0 to 4
997
+
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
998
+
#define TIMER_INTERRUPT_DEBUG 0
999
+
#define _TIMERINTERRUPT_LOGLEVEL_ 0
1025
1000
```
1026
1001
1027
1002
---
@@ -1038,6 +1013,12 @@ Sometimes, the library will only work if you update the board core to the latest
1038
1013
1039
1014
## Releases
1040
1015
1016
+
### Releases v1.4.0
1017
+
1018
+
1. Add support to **Adafruit AVR ATMEGA_32U4** such as **AVR_FLORA8, AVR_FEATHER32U4, etc.**
1019
+
2. Add support to **Adafruit AVR ATMEGA_328(P)** such as **AVR_FEATHER328P, AVR_METRO, etc.**
1020
+
3. Update examples
1021
+
1041
1022
### Releases v1.3.0
1042
1023
1043
1024
1. Add support to **AVR ATMEGA_16U4, ATMEGA_32U4** such as **Leonardo, YUN, ESPLORA, etc.**
@@ -1080,14 +1061,12 @@ in loop(), using delay() function as an example. The elapsed time then is very u
1080
1061
1081
1062
---
1082
1063
1083
-
### Supported Arduino Boards
1064
+
### Currently supported Boards
1084
1065
1085
-
- Arduino Uno / Mega / Leonardo / Duemilanove / Diecimila / LilyPad / Mini / Fio / Nano etc.
1086
-
- Sanguino
1087
-
- ATmega8, 48, 88, 168, 328
1088
-
- ATmega8535, 16, 32, 164, 324, 644, 1284,
1089
-
- ATmega64, 128
1090
-
- ATtiny 84 / 85
1066
+
- Arduino Uno / Mega / Duemilanove / Diecimila / LilyPad / Mini / Fio / Nano, etc.
1067
+
-**Arduino ATMega 16U4, 32U4** such as AVR Leonardo, Leonardo ETH, YUN, Esplora, LILYPAD_USB, AVR_ROBOT_CONTROL, AVR_ROBOT_MOTOR, AVR_INDUSTRIAL101, etc.
1068
+
-**Adafruit ATMega 32U4** such as AVR_FLORA8, AVR_FEATHER32U4, AVR_CIRCUITPLAY, AVR_ITSYBITSY32U4_5V, AVR_ITSYBITSY32U4_3V, AVR_BLUEFRUITMICRO, AVR_ADAFRUIT32U4, etc.
1069
+
-**Adafruit ATMega 328(P)** such as AVR_METRO, AVR_FEATHER328P, AVR_PROTRINKET5, AVR_PROTRINKET3, AVR_PROTRINKET5FTDI, AVR_PROTRINKET3FTDI, etc.
1091
1070
1092
1071
---
1093
1072
---
@@ -1113,8 +1092,9 @@ Submit issues to: [TimerInterrupt issues](https://github.com/khoih-prog/TimerInt
1113
1092
4. Fix some bugs in v1.0.0
1114
1093
5. Add more examples.
1115
1094
6. Similar library for ESP32, ESP8266, SAMD21/SAMD51, nRF52, Mbed-OS Nano-33-BLE, STM32
1116
-
7. Add support to **ATMega-16U4, ATMega-32U4**-based boards
1117
-
1095
+
7. Add support to **Arduino ATMega-16U4, ATMega-32U4**-based boards
1096
+
8. Add support to **Adafruit ATMega-32U4**-based boards
1097
+
9. Add support to **Adafruit ATMega-328(P)**-based boards
1118
1098
1119
1099
---
1120
1100
---
@@ -1124,13 +1104,15 @@ Submit issues to: [TimerInterrupt issues](https://github.com/khoih-prog/TimerInt
1124
1104
Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library. Especially to these people who have directly or indirectly contributed to this [TimerInterrupt library](https://github.com/khoih-prog/TimerInterrupt)
1125
1105
1126
1106
1. Thanks to [Django0](https://github.com/Django0) to provide the following PR [Fixed warnings from cppcheck (platformio) and -Wall arduino-cli. PR#10](https://github.com/khoih-prog/TimerInterrupt/pull/10).
1127
-
2. Thanks to [eslavko](https://github.com/eslavko) to report the issue [Error compiling for arduino leonardo #13](https://github.com/khoih-prog/TimerInterrupt/issues/13) leading to new release v1.3.0 to provide support to **ATMega-16U4, ATMega-32U4**-based boards, such as AVR Leonardo, Leonardo ETH, YUN, Esplora, LILYPAD_USB, AVR_ROBOT_CONTROL, AVR_ROBOT_MOTOR, AVR_INDUSTRIAL101, etc..
1107
+
2. Thanks to [eslavko](https://github.com/eslavko) to report the issue [Error compiling for arduino leonardo #13](https://github.com/khoih-prog/TimerInterrupt/issues/13) leading to new release v1.3.0 to provide support to **Arduino ATMega-16U4, ATMega-32U4**-based boards, such as AVR Leonardo, Leonardo ETH, YUN, Esplora, LILYPAD_USB, AVR_ROBOT_CONTROL, AVR_ROBOT_MOTOR, AVR_INDUSTRIAL101, etc..
1108
+
3. Thanks to [bzuidgeest](https://github.com/bzuidgeest) to report the issue [Adafruit feather 32u4 #17](https://github.com/khoih-prog/TimerInterrupt/issues/17) leading to new release v1.4.0 to provide support to Adafruit **ATMega-32U4**-based boards, such as AVR_FLORA8, AVR_FEATHER32U4, AVR_CIRCUITPLAY, AVR_ITSYBITSY32U4_5V, AVR_ITSYBITSY32U4_3V, AVR_BLUEFRUITMICRO, AVR_ADAFRUIT32U4, etc. and Adafrui ATMega-328(P)-based boards, such as AVR_METRO, AVR_FEATHER328P, AVR_PROTRINKET5, AVR_PROTRINKET3, AVR_PROTRINKET5FTDI, AVR_PROTRINKET3FTDI, etc.
0 commit comments