Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working #15

Open
De-Jeriyo opened this issue Jul 11, 2024 · 2 comments
Open

Not working #15

De-Jeriyo opened this issue Jul 11, 2024 · 2 comments

Comments

@De-Jeriyo
Copy link

The example code gives me this error "c:\Users\User\Documents\Arduino\libraries\ESP32_AnalogWrite\analogWrite.cpp: In function 'int analogWriteChannel(uint8_t)':
c:\Users\User\Documents\Arduino\libraries\ESP32_AnalogWrite\analogWrite.cpp:44:9: error: 'ledcSetup' was not declared in this scope
44 | ledcSetup(channel, _analog_write_channels[i].frequency, _analog_write_channels[i].resolution);
| ^~~~~~~~~
c:\Users\User\Documents\Arduino\libraries\ESP32_AnalogWrite\analogWrite.cpp:45:9: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
45 | ledcAttachPin(pin, channel);
| ^~~~~~~~~~~~~
| ledcAttach"

@dee1337
Copy link
Contributor

dee1337 commented Aug 23, 2024

fixed it in 3e0fb55

@codemasters1
Copy link

OLD ver
ledcSetup(PWM_CHANNEL, PWM_FREQUENCY, PWM_RESOLUTION);
ledcAttachPin(BUZZER_PIN, PWM_CHANNEL);

NEW ver
ledcAttach(BUZZER_PIN, PWM_FREQUENCY, PWM_RESOLUTION);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants