Search found 2 matches

by Heiner
Fri Feb 09, 2024 9:37 am
Forum: ESP32 Arduino
Topic: 2 different PWM frequencies required, but ledcAttachChannel was not declared in this scope
Replies: 3
Views: 3786

Re: 2 different PWM frequencies required, but ledcAttachChannel was not declared in this scope

Sorry, this does not solve the problem. I used the latest 3.0.0-alpha3.
In the migration documentation there is a link from 2. to 3:
https://docs.espressif.com/projects/arduino-esp32/en/latest/api/ledc.html
which is clearly described here:
bool ledcAttach(uint8_t pin, uint32_t freq, uint8_t ...
by Heiner
Sat Jan 27, 2024 7:40 pm
Forum: ESP32 Arduino
Topic: 2 different PWM frequencies required, but ledcAttachChannel was not declared in this scope
Replies: 3
Views: 3786

2 different PWM frequencies required, but ledcAttachChannel was not declared in this scope

I need two different frequencies for my project, 4KHz and 20KHz.
The use of:

ledcAttach(2, 4000,8);
ledcWrite(2, 127);
ledcAttach(10, 20000,8);
ledcWrite(10, 127);


deliver on both channels/Pins 20KHz;

The use of:

ledcAttach(10, 20000,8);
ledcWrite(10, 127);
ledcAttach(2, 4000,8);
ledcWrite(2 ...

Go to advanced search