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 Feb 4, 2023. It is now read-only.
<ahref="https://www.buymeacoffee.com/khoihprog6"target="_blank"><imgsrc="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"alt="Buy Me A Coffee"style="height: 60px!important;width: 217px!important;" ></a>
9
+
10
+
<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>
@@ -90,7 +95,7 @@ This library is using the **same or similar functions** as other FastPWM librari
90
95
91
96
The most important feature is they're purely hardware-based PWM channels. Therefore, their executions are **not blocked by bad-behaving functions / tasks**. This important feature is absolutely necessary for mission-critical tasks.
92
97
93
-
This important feature is absolutely necessary for mission-critical tasks. 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.
98
+
This important feature is absolutely necessary for mission-critical tasks. 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.
94
99
95
100
The [**PWM_Multi**](examples/PWM_Multi) will demonstrate the usage of multichannel PWM using multiple Hardware Timers. The 4 independent Hardware Timers are used **to control 4 different PWM outputs**, with totally independent frequencies and dutycycles. You can **start, stop, change and restore the settings of any PWM channel on-the-fly**.
96
101
@@ -110,9 +115,9 @@ You'd prefer to have your function called, no matter what happening with other f
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:
118
123
@@ -147,9 +152,9 @@ You can also use this link [ page.
150
-
2. Download the latest release `Portenta_H7_PWM-master.zip`.
151
-
3. Extract the zip file to `Portenta_H7_PWM-master` directory
152
-
4. Copy whole `Portenta_H7_PWM-master` folder to Arduino libraries' directory such as `~/Arduino/libraries/`.
155
+
2. Download the latest release `Portenta_H7_PWM-main.zip`.
156
+
3. Extract the zip file to `Portenta_H7_PWM-main` directory
157
+
4. Copy whole `Portenta_H7_PWM-main` folder to Arduino libraries' directory such as `~/Arduino/libraries/`.
153
158
154
159
### VS Code & PlatformIO
155
160
@@ -168,14 +173,14 @@ The current library implementation, using `xyz-Impl.h` instead of standard `xyz.
168
173
169
174
You can include this `.hpp` file
170
175
171
-
```
176
+
```cpp
172
177
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
in many files. But be sure to use the following `.h` file **in just 1 `.h`, `.cpp` or `.ino` file**, which must **not be included in any other file**, to avoid `Multiple Definitions` Linker Error
177
182
178
-
```
183
+
```cpp
179
184
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
The following is the sample terminal output when running example [PWM_Single](examples/PWM_Single) on **Portenta_H7** to demonstrate how to start a single PWM channel, then stop, change, restore the PWM settings on-the-fly.
The following is the sample terminal output when running example [**PWM_Multi**](examples/PWM_Multi) on **Portenta_H7** to demonstrate how to start multiple PWM channels, then stop, change, restore the PWM settings on-the-fly.
734
739
735
-
```
740
+
```cpp
736
741
737
742
Starting PWM_Multi on PORTENTA_H7_M7
738
743
Portenta_H7_PWM v2.0.2
@@ -846,12 +851,12 @@ If you want to contribute to this project:
846
851
847
852
### License
848
853
849
-
- The library is licensed under [MIT](https://github.com/khoih-prog/Portenta_H7_PWM/blob/master/LICENSE)
854
+
- The library is licensed under [MIT](https://github.com/khoih-prog/Portenta_H7_PWM/blob/main/LICENSE)
<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