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.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,14 @@ However, before reporting a bug please check through the following:
10
10
11
11
If you don't find anything, please [open a new issue](https://github.com/khoih-prog/ESP32_FastPWM/issues/new).
12
12
13
+
---
14
+
13
15
### How to submit a bug report
14
16
15
17
Please ensure to specify the following:
16
18
17
19
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18
-
*`ESP32` Core Version (e.g. ESP32 core v2.0.5)
20
+
*`ESP32` Core Version (e.g. ESP32 core v2.0.6)
19
21
*`ESP32` Board type (e.g. ESP32_DEV Module, etc.)
20
22
*`ESP32-S2` Board type (e.g. ESP32S2_DEV Module, ESP32_S2_Saola, etc.)
21
23
*`ESP32_S3` Board type (e.g. ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.)
@@ -27,14 +29,18 @@ Please ensure to specify the following:
27
29
* Network configuration
28
30
29
31
32
+
Please be educated, civilized and constructive as you've always been. Disrespective posts against [GitHub Code of Conduct](https://docs.github.com/en/site-policy/github-terms/github-event-code-of-conduct) will be ignored and deleted.
33
+
34
+
---
35
+
30
36
### Example
31
37
32
38
```
33
39
Arduino IDE version: 1.8.19
34
-
ESP32 core v2.0.5
40
+
ESP32 core v2.0.6
35
41
ESP32S3_DEV Module
36
42
OS: Ubuntu 20.04 LTS
37
-
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
43
+
Linux xy-Inspiron-3593 5.15.0-58-generic #64~20.04.1-Ubuntu SMP Fri Jan 6 16:42:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Copy file name to clipboardExpand all lines: README.md
+32-19Lines changed: 32 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
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
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>
*[1. PWM_DynamicDutyCycle on ESP32_DEV](#1-PWM_DynamicDutyCycle-on-ESP32_DEV)
@@ -142,7 +144,7 @@ Functions using normal software-based PWMs, relying on loop() and calling millis
142
144
## Prerequisites
143
145
144
146
1.[`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [](https://github.com/arduino/Arduino/releases/latest)
145
-
2.[`ESP32 Core 2.0.5+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [](https://github.com/espressif/arduino-esp32/releases/latest/).
147
+
2.[`ESP32 Core 2.0.6+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [](https://github.com/espressif/arduino-esp32/releases/latest/).
146
148
147
149
148
150
@@ -185,33 +187,33 @@ Please have a look at [**ESP_WiFiManager Issue 39: Not able to read analog port
185
187
186
188
#### 2. ESP32 ADCs functions
187
189
188
-
- ADC1 controls ADC function for pins **GPIO32-GPIO39**
189
-
- ADC2 controls ADC function for pins **GPIO0, 2, 4, 12-15, 25-27**
190
+
-`ADC1` controls ADC function for pins **GPIO32-GPIO39**
191
+
-`ADC2` controls ADC function for pins **GPIO0, 2, 4, 12-15, 25-27**
190
192
191
193
#### 3.. ESP32 WiFi uses ADC2 for WiFi functions
192
194
193
195
Look in file [**adc_common.c**](https://github.com/espressif/esp-idf/blob/master/components/driver/adc_common.c#L61)
194
196
195
-
> In ADC2, there're two locks used for different cases:
197
+
> In `ADC2`, there're two locks used for different cases:
196
198
> 1. lock shared with app and Wi-Fi:
197
199
> ESP32:
198
-
> When Wi-Fi using the ADC2, we assume it will never stop, so app checks the lock and returns immediately if failed.
200
+
> When Wi-Fi using the `ADC2`, we assume it will never stop, so app checks the lock and returns immediately if failed.
199
201
> ESP32S2:
200
202
> The controller's control over the ADC is determined by the arbiter. There is no need to control by lock.
201
203
>
202
204
> 2. lock shared between tasks:
203
-
> when several tasks sharing the ADC2, we want to guarantee
205
+
> when several tasks sharing the `ADC2`, we want to guarantee
204
206
> all the requests will be handled.
205
207
> Since conversions are short (about 31us), app returns the lock very soon,
206
208
> we use a spinlock to stand there waiting to do conversions one by one.
207
209
>
208
210
> adc2_spinlock should be acquired first, then adc2_wifi_lock or rtc_spinlock.
209
211
210
212
211
-
- In order to use ADC2 for other functions, we have to **acquire complicated firmware locks and very difficult to do**
212
-
- So, it's not advisable to use ADC2 with WiFi/BlueTooth (BT/BLE).
213
-
- Use ADC1, and pins GPIO32-GPIO39
214
-
- If somehow it's a must to use those pins serviced by ADC2 (**GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27**), use the **fix mentioned at the end** of [**ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example**](https://github.com/khoih-prog/ESP_WiFiManager/issues/39) to work with ESP32 WiFi/BlueTooth (BT/BLE).
213
+
- In order to use `ADC2` for other functions, we have to **acquire complicated firmware locks and very difficult to do**
214
+
- So, it's not advisable to use `ADC2` with WiFi/BlueTooth (BT/BLE).
215
+
- Use `ADC1`, and pins **GPIO32-GPIO39**
216
+
- If somehow it's a must to use those pins serviced by `ADC2` (**GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27**), use the **fix mentioned at the end** of [**ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example**](https://github.com/khoih-prog/ESP_WiFiManager/issues/39) to work with ESP32 WiFi/BlueTooth (BT/BLE)
@@ -706,14 +709,13 @@ Submit issues to: [ESP32_FastPWM issues](https://github.com/khoih-prog/ESP32_Fas
706
709
## TO DO
707
710
708
711
1. Search for bug and improvement.
709
-
2. Similar features for remaining Arduino boards such as SAMD21, SAMD51, SAM-DUE, nRF52, ESP8266, STM32, Portenta_H7, RP2040, etc.
710
-
711
712
713
+
---
712
714
713
715
## DONE
714
716
715
717
1. Basic hardware PWM-channels for `ESP32, ESP32_S2, ESP32_S3 and ESP32_C3` using [ESP32 core](https://github.com/espressif/arduino-esp32)
716
-
718
+
2. Add example [PWM_StepperControl](https://github.com/khoih-prog/ESP32_FastPWM/examples/PWM_StepperControl) to demo how to control Stepper Motor using PWM
717
719
718
720
---
719
721
---
@@ -722,12 +724,23 @@ Submit issues to: [ESP32_FastPWM issues](https://github.com/khoih-prog/ESP32_Fas
722
724
723
725
Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.
724
726
727
+
1. Thanks to [Paul van Dinther](https://github.com/dinther) for proposing new way to use PWM to drive Stepper-Motor in [Using PWM to step a stepper driver #16](https://github.com/khoih-prog/RP2040_PWM/issues/16), leading to v1.0.1
728
+
729
+
730
+
<table>
731
+
<tr>
732
+
<td align="center"><a href="https://github.com/dinther"><img src="https://github.com/dinther.png" width="100px;" alt="dinther"/><br /><sub><b>Paul van Dinther</b></sub></a><br /></td>
Copy file name to clipboardExpand all lines: changelog.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,21 @@
17
17
## Table of Contents
18
18
19
19
*[Changelog](#changelog)
20
+
*[Releases v1.0.1](#releases-v101)
20
21
*[Releases v1.0.0](#releases-v100)
21
22
22
23
---
23
24
---
24
25
25
26
## Changelog
26
27
28
+
### Releases v1.0.1
29
+
30
+
1. Add example [PWM_StepperControl](https://github.com/khoih-prog/ESP32_FastPWM/examples/PWM_StepperControl) to demo how to control Stepper Motor using PWM. Check [Using PWM to step a stepper driver #16](https://github.com/khoih-prog/RP2040_PWM/issues/16)
31
+
27
32
28
33
### Releases v1.0.0
29
34
30
35
1. Initial coding for ESP32, ESP32_S2, ESP32_S3 and ESP32_C3 boards using [ESP32 core](https://github.com/espressif/arduino-esp32)
0 commit comments