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

Commit 8ec2d60

Browse files
authored
v1.3.1 to fix DutyCycle bug, etc.
### Releases v1.3.1 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 56a50a6 commit 8ec2d60

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

examples/ISR_16_PWMs_Array/ISR_16_PWMs_Array.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// These define's must be placed at the beginning before #include "ESP32_PWM.h"
3131
// _PWM_LOGLEVEL_ from 0 to 4
3232
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
33-
#define _PWM_LOGLEVEL_ 4
33+
#define _PWM_LOGLEVEL_ 3
3434

3535
#define USING_MICROS_RESOLUTION true //false
3636

examples/ISR_16_PWMs_Array_Complex/ISR_16_PWMs_Array_Complex.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
// These define's must be placed at the beginning before #include "ESP32_PWM.h"
3030
// _PWM_LOGLEVEL_ from 0 to 4
3131
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
32-
#define _PWM_LOGLEVEL_ 4
32+
#define _PWM_LOGLEVEL_ 3
3333

3434
#define USING_MICROS_RESOLUTION true //false
3535

3636
// Default is true, uncomment to false
37-
//#define CHANGING_PWM_END_OF_CYCLE false
37+
//#define CHANGING_PWM_END_OF_CYCLE false
3838

3939
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
4040
#include "ESP32_PWM.h"

examples/ISR_16_PWMs_Array_Simple/ISR_16_PWMs_Array_Simple.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
// These define's must be placed at the beginning before #include "ESP32_PWM.h"
3030
// _PWM_LOGLEVEL_ from 0 to 4
3131
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
32-
#define _PWM_LOGLEVEL_ 4
32+
#define _PWM_LOGLEVEL_ 3
3333

3434
#define USING_MICROS_RESOLUTION true //false
3535

3636
// Default is true, uncomment to false
37-
//#define CHANGING_PWM_END_OF_CYCLE false
37+
//#define CHANGING_PWM_END_OF_CYCLE false
3838

3939
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
4040
#include "ESP32_PWM.h"

examples/ISR_Changing_PWM/ISR_Changing_PWM.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// These define's must be placed at the beginning before #include "ESP32_PWM.h"
3030
// _PWM_LOGLEVEL_ from 0 to 4
3131
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
32-
#define _PWM_LOGLEVEL_ 4
32+
#define _PWM_LOGLEVEL_ 3
3333

3434
#define USING_MICROS_RESOLUTION true //false
3535

examples/ISR_Modify_PWM/ISR_Modify_PWM.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// These define's must be placed at the beginning before #include "ESP32_PWM.h"
3030
// _PWM_LOGLEVEL_ from 0 to 4
3131
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
32-
#define _PWM_LOGLEVEL_ 4
32+
#define _PWM_LOGLEVEL_ 3
3333

3434
#define USING_MICROS_RESOLUTION true //false
3535

@@ -71,19 +71,19 @@ bool IRAM_ATTR TimerHandler(void * timerNo)
7171
uint32_t PWM_Pin = LED_BUILTIN;
7272

7373
// You can assign any interval for any timer here, in Hz
74-
float PWM_Freq1 = 100.0f;
74+
float PWM_Freq1 = 200.0f; //1.0f;
7575
// You can assign any interval for any timer here, in Hz
76-
float PWM_Freq2 = 200.0f;
76+
float PWM_Freq2 = 100.0f; //2.0f;
7777

7878
// You can assign any interval for any timer here, in microseconds
7979
uint32_t PWM_Period1 = 1000000 / PWM_Freq1;
8080
// You can assign any interval for any timer here, in microseconds
8181
uint32_t PWM_Period2 = 1000000 / PWM_Freq2;
8282

8383
// You can assign any duty_cycle for any PWM here, from 0-100
84-
float PWM_DutyCycle1 = 10.0;
84+
float PWM_DutyCycle1 = 1.0f; //50.0f;
8585
// You can assign any duty_cycle for any PWM here, from 0-100
86-
float PWM_DutyCycle2 = 90.0;
86+
float PWM_DutyCycle2 = 5.55f; //90.0f;
8787

8888
// Channel number used to identify associated channel
8989
int channelNum;

examples/multiFileProject/multiFileProject.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
#error This code is designed to run on ESP32 platform, not Arduino nor ESP8266! Please check your Tools->Board setting.
1515
#endif
1616

17-
#define ESP32_PWM_VERSION_MIN_TARGET "ESP32_PWM v1.2.2"
18-
#define ESP32_PWM_VERSION_MIN 1002002
17+
#define ESP32_PWM_VERSION_MIN_TARGET "ESP32_PWM v1.3.1"
18+
#define ESP32_PWM_VERSION_MIN 1003001
1919

2020
// These define's must be placed at the beginning before #include "ESP32_PWM.h"
2121
// _PWM_LOGLEVEL_ from 0 to 4
2222
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
23-
#define _PWM_LOGLEVEL_ 4
23+
#define _PWM_LOGLEVEL_ 3
2424

2525
#include "multiFileProject.h"
2626

0 commit comments

Comments
 (0)