mirror of https://github.com/arendst/Tasmota.git
Lower minimum PWMFrequency to 40Hz
This commit is contained in:
parent
c37dbc1aee
commit
b53dee396e
|
@ -45,8 +45,8 @@ extern void __analogWriteRange(uint32_t range) {
|
||||||
|
|
||||||
|
|
||||||
extern void __analogWriteFreq(uint32_t freq) {
|
extern void __analogWriteFreq(uint32_t freq) {
|
||||||
if (freq < 100) {
|
if (freq < 40) { // Arduino sets a minimum of 100Hz, waiting for them to change this one.
|
||||||
analogFreq = 100;
|
analogFreq = 40;
|
||||||
} else if (freq > 60000) {
|
} else if (freq > 60000) {
|
||||||
analogFreq = 60000;
|
analogFreq = 60000;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -106,7 +106,7 @@ const uint32_t PWM_RANGE = 1023; // 255..1023 needs to be devisible b
|
||||||
//const uint16_t PWM_FREQ = 910; // 100..1000 Hz led refresh (iTead value)
|
//const uint16_t PWM_FREQ = 910; // 100..1000 Hz led refresh (iTead value)
|
||||||
const uint16_t PWM_FREQ = 223; // 100..4000 Hz led refresh
|
const uint16_t PWM_FREQ = 223; // 100..4000 Hz led refresh
|
||||||
const uint16_t PWM_MAX = 4000; // [PWM_MAX] Maximum frequency - Default: 4000
|
const uint16_t PWM_MAX = 4000; // [PWM_MAX] Maximum frequency - Default: 4000
|
||||||
const uint16_t PWM_MIN = 100; // [PWM_MIN] Minimum frequency - Default: 100
|
const uint16_t PWM_MIN = 40; // [PWM_MIN] Minimum frequency - Default: 40
|
||||||
// For Dimmers use double of your mains AC frequecy (100 for 50Hz and 120 for 60Hz)
|
// For Dimmers use double of your mains AC frequecy (100 for 50Hz and 120 for 60Hz)
|
||||||
// For Controlling Servos use 50 and also set PWM_FREQ as 50 (DO NOT USE THESE VALUES FOR DIMMERS)
|
// For Controlling Servos use 50 and also set PWM_FREQ as 50 (DO NOT USE THESE VALUES FOR DIMMERS)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue