Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit 192da87

Browse files
authored
v1.2.4 to fix DutyCycle bug, etc.
### Releases v1.2.4 1. Fix `DutyCycle` bug. Check [float precisison of DutyCycle only sometimes working #3](khoih-prog/SAMD_Slow_PWM#3) 2. Fix `New Period` display bug. Check [random dropouts #4](khoih-prog/SAMD_Slow_PWM#4) 3. Update examples
1 parent bd18569 commit 192da87

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

examples/ISR_16_PWMs_Array/ISR_16_PWMs_Array.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// These define's must be placed at the beginning before #include "ESP8266_PWM.h"
2525
// _PWM_LOGLEVEL_ from 0 to 4
2626
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
27-
#define _PWM_LOGLEVEL_ 4
27+
#define _PWM_LOGLEVEL_ 3
2828

2929
#define USING_MICROS_RESOLUTION true //false
3030

examples/ISR_Modify_PWM/ISR_Modify_PWM.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
*****************************************************************************************************************************/
1919

2020
#if !defined(ESP8266)
21-
#error This code is designed to run on ESP8266 and ESP8266-based boards! Please check your Tools->Board setting.
21+
#error This code is designed to run on ESP8266 and ESP8266-based boards! Please check your Tools->Board setting.
2222
#endif
2323

2424
// These define's must be placed at the beginning before #include "ESP8266_PWM.h"
2525
// _PWM_LOGLEVEL_ from 0 to 4
2626
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
27-
#define _PWM_LOGLEVEL_ 4
27+
#define _PWM_LOGLEVEL_ 3
2828

2929
#define USING_MICROS_RESOLUTION true //false
3030

@@ -68,19 +68,19 @@ void IRAM_ATTR TimerHandler()
6868
uint32_t PWM_Pin = LED_BUILTIN;
6969

7070
// You can assign any interval for any timer here, in Hz
71-
float PWM_Freq1 = 1.0f;
71+
float PWM_Freq1 = 200.0f; //1.0f;
7272
// You can assign any interval for any timer here, in Hz
73-
float PWM_Freq2 = 2.0f;
73+
float PWM_Freq2 = 100.0f; //2.0f;
7474

7575
// You can assign any interval for any timer here, in microseconds
7676
uint32_t PWM_Period1 = 1000000 / PWM_Freq1;
7777
// You can assign any interval for any timer here, in microseconds
7878
uint32_t PWM_Period2 = 1000000 / PWM_Freq2;
7979

8080
// You can assign any duty_cycle for any PWM here, from 0-100
81-
float PWM_DutyCycle1 = 50.0;
81+
float PWM_DutyCycle1 = 1.0f; //50.0f;
8282
// You can assign any duty_cycle for any PWM here, from 0-100
83-
float PWM_DutyCycle2 = 90.0;
83+
float PWM_DutyCycle2 = 5.55f; //90.0f;
8484

8585
// Channel number used to identify associated channel
8686
int channelNum;

examples/multiFileProject/multiFileProject.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#error This code is designed to run on ESP8266 and ESP8266-based boards! Please check your Tools->Board setting.
1515
#endif
1616

17-
#define ESP8266_PWM_VERSION_MIN_TARGET "ESP8266_PWM v1.2.3"
18-
#define ESP8266_PWM_VERSION_MIN 1002003
17+
#define ESP8266_PWM_VERSION_MIN_TARGET "ESP8266_PWM v1.2.4"
18+
#define ESP8266_PWM_VERSION_MIN 1002004
1919

2020
#include "multiFileProject.h"
2121

0 commit comments

Comments
 (0)