We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
on esp32, analogWrite function is not avaliable.
// setting PWM properties const int freq = 5000; const int ledChannel = 0; const int resolution = 8; .... //setup() // configure LED PWM functionalitites ledcSetup(ledChannel, freq, resolution); // attach the channel to the GPIO to be controlled ledcAttachPin(LED_Pin, ledChannel); pinMode(LED_Pin, OUTPUT); ... // void updateLEDBrightness(int brightness_percentage) { #ifdef LED_Pin #ifdef ESP32 ledcWrite(ledChannel, (int)brightness_percentage * 255 / 100); #else analogWrite(LED_Pin, (int)brightness_percentage * 255 / 100); #endif #endif }
this will be work fine
The text was updated successfully, but these errors were encountered:
Thanks for the update, merge done ;)
Sorry, something went wrong.
No branches or pull requests
on esp32, analogWrite function is not avaliable.
this will be work fine
The text was updated successfully, but these errors were encountered: