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.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+29-4Lines changed: 29 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
15
15
Please ensure to specify the following:
16
16
17
17
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18
-
*`RP2040` Core Version (e.g. RP2040 core v2.5.4)
18
+
*`RP2040` Core Version (e.g. RP2040 core v2.6.3)
19
19
*`RP2040` Board type (e.g. RASPBERRY_PI_PICO, RASPBERRY_PI_PICO_W, ADAFRUIT_FEATHER_RP2040, GENERIC_RP2040, etc.)
20
20
* Contextual information (e.g. what you were trying to achieve)
21
21
* Simplest possible steps to reproduce
@@ -28,27 +28,52 @@ Please ensure to specify the following:
28
28
29
29
```
30
30
Arduino IDE version: 1.8.19
31
-
RP2040 core v2.5.4
31
+
RP2040 core v2.6.3
32
32
RASPBERRY_PI_PICO Module
33
33
OS: Ubuntu 20.04 LTS
34
-
Linux xy-Inspiron-3593 5.15.0-48-generic #54~20.04.1-Ubuntu SMP Thu Sep 1 16:17:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
34
+
Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
35
35
36
36
Context:
37
37
I encountered a crash while using this library
38
-
39
38
Steps to reproduce:
40
39
1. ...
41
40
2. ...
42
41
3. ...
43
42
4. ...
44
43
```
44
+
45
+
### Additional context
46
+
47
+
Add any other context about the problem here.
48
+
49
+
---
50
+
45
51
### Sending Feature Requests
46
52
47
53
Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.
48
54
49
55
There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/RPI_PICO_TimerInterrupt/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.
50
56
57
+
---
58
+
51
59
### Sending Pull Requests
52
60
53
61
Pull Requests with changes and fixes are also welcome!
54
62
63
+
Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux)
64
+
65
+
1. Change directory to the library GitHub
66
+
67
+
```
68
+
xy@xy-Inspiron-3593:~$ cd Arduino/xy/RPI_PICO_TimerInterrupt_GitHub/
<ahref="https://www.buymeacoffee.com/khoihprog6"title="Donate to my libraries using BuyMeACoffee"><imgsrc="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
11
<ahref="https://www.buymeacoffee.com/khoihprog6"title="Donate to my libraries using BuyMeACoffee"><imgsrc="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>
@@ -98,26 +103,27 @@ Being ISR-based timers, their executions are not blocked by bad-behaving functio
98
103
This non-being-blocked important feature is absolutely necessary for mission-critical tasks.
99
104
100
105
You'll see blynkTimer Software is blocked while system is connecting to WiFi / Internet / Blynk, as well as by blocking task
101
-
in loop(), using delay() function as an example. The elapsed time then is very unaccurate
106
+
in `loop()`, using delay() function as an example. The elapsed time then is very unaccurate
102
107
103
108
### Why using ISR-based Hardware Timer Interrupt is better
104
109
105
-
Imagine you have a system with a **mission-critical** function, measuring water level and control the sump pump or doing something much more important. You normally use a software timer to poll, or even place the function in loop(). But what if another function is **blocking** the loop() or setup().
110
+
Imagine you have a system with a **mission-critical** function, measuring water level and control the sump pump or doing something much more important. You normally use a software timer to poll, or even place the function in `loop()`. But what if another function is **blocking** the `loop()` or `setup()`.
106
111
107
112
So your function **might not be executed, and the result would be disastrous.**
108
113
109
114
You'd prefer to have your function called, no matter what happening with other functions (busy loop, bug, etc.).
110
115
111
116
The correct choice is to use a Hardware Timer with **Interrupt** to call your function.
112
117
113
-
These hardware timers, using interrupt, still work even if other functions are blocking. Moreover, they are much more **precise** (certainly depending on clock frequency accuracy) than other software timers using millis() or micros(). That's necessary if you need to measure some data requiring better accuracy.
118
+
These hardware timers, using interrupt, still work even if other functions are blocking. Moreover, they are much more **precise** (certainly depending on clock frequency accuracy) than other software timers using `millis()` or `micros()`. That's necessary if you need to measure some data requiring better accuracy.
114
119
115
-
Functions using normal software timers, relying on loop() and calling millis(), won't work if the loop() or setup() is blocked by certain operation. For example, certain function is blocking while it's connecting to WiFi or some services.
120
+
Functions using normal software timers, relying on `loop()` and calling `millis()`, won't work if the `loop()` or `setup()` is blocked by certain operation. For example, certain function is blocking while it's connecting to WiFi or some services.
116
121
117
122
The catch is **your function is now part of an ISR (Interrupt Service Routine), and must be lean / mean, and follow certain rules.** More to read on:
@@ -140,9 +146,13 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),
140
146
## Prerequisites
141
147
142
148
1.[`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [](https://github.com/arduino/Arduino/releases/latest)
143
-
2.[`Earle Philhower's arduino-pico core v2.5.4+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [](https://github.com/earlephilhower/arduino-pico/releases/latest)
144
-
3. To use with certain example
145
-
-[`SimpleTimer library`](https://github.com/jfturcot/SimpleTimer) for [ISR_Timers_Array_Simple](examples/ISR_Timers_Array_Simple) and [ISR_16_Timers_Array_Complex](examples/ISR_16_Timers_Array_Complex) examples.
149
+
2.[`Earle Philhower's arduino-pico core v2.6.3+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [](https://github.com/earlephilhower/arduino-pico/releases/latest)
150
+
3. To use with certain example, depending on which Ethernet card you're using:
151
+
-[`Ethernet_Generic library v2.7.1+`](https://github.com/khoih-prog/Ethernet_Generic) for W5100, W5200 and W5500. [](https://github.com/khoih-prog/Ethernet_Generic/releases/latest)
152
+
-[`EthernetENC library v2.0.3+`](https://github.com/jandrassy/EthernetENC) for ENC28J60. [](https://github.com/jandrassy/EthernetENC/releases/latest). **New and Better**
153
+
-[`UIPEthernet library v2.0.12+`](https://github.com/UIPEthernet/UIPEthernet) for ENC28J60. [](https://github.com/UIPEthernet/UIPEthernet/releases/latest)
154
+
4. To use with certain example
155
+
-[`SimpleTimer library`](https://github.com/jfturcot/SimpleTimer) for [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) and [ISR_16_Timers_Array_Complex](examples/ISR_16_Timers_Array_Complex) examples.
<ahref="https://www.buymeacoffee.com/khoihprog6"title="Donate to my libraries using BuyMeACoffee"><imgsrc="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"alt="Donate to my libraries using BuyMeACoffee"style="height: 50px!important;width: 181px!important;" ></a>
11
+
<ahref="https://www.buymeacoffee.com/khoihprog6"title="Donate to my libraries using BuyMeACoffee"><imgsrc="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>
0 commit comments