Comments on: ESP32 PWM with Arduino IDE (Analog Output) https://randomnerdtutorials.com/esp32-pwm-arduino-ide/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Wed, 25 Jun 2025 22:53:41 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: mozammel https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-1060984 Wed, 25 Jun 2025 22:53:41 +0000 https://randomnerdtutorials.com/?p=75663#comment-1060984 Hi, Sara. Thanks for this informative tutorial. I would like to know if I can utilize this PWM with LEDC API to generate a clock pulse with frequency as high as 64 MHz. The Table 28.2-1. Commonly-used Frequencies and Resolutions in this link (www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf#ledpwm) gives PWM frequency in KHz. Does that mean that there is no way I will be able to achieve a frequency in MHz, let alone a clock pulse? Please let me know your opinion on my requirement said above. Thanks in advance.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-1052983 Sun, 01 Jun 2025 10:10:48 +0000 https://randomnerdtutorials.com/?p=75663#comment-1052983 In reply to alex.

Hi.
Update your ESP32 boards to version 3.
Go to Tools > Boards > Boards Manager > Search for ESP32, and update to version 3.
Regards,
Sara

]]>
By: alex https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-1052328 Fri, 30 May 2025 10:29:14 +0000 https://randomnerdtutorials.com/?p=75663#comment-1052328 PLEASE HELP ME
Error :

C:\Users\intel\Downloads\xe_tranh_vat_can_Arduino\xe_tranh_vat_can_Arduino.ino: In function ‘void setup()’:
C:\Users\intel\Downloads\xe_tranh_vat_can_Arduino\xe_tranh_vat_can_Arduino.ino:17:3: error: ‘ledcAttach’ was not declared in this scope
ledcAttach(ledPin, freq, resolution);
^~~~~~~~~~
C:\Users\intel\Downloads\xe_tranh_vat_can_Arduino\xe_tranh_vat_can_Arduino.ino:17:3: note: suggested alternative: ‘ledcAttachPin’
ledcAttach(ledPin, freq, resolution);
^~~~~~~~~~
ledcAttachPin
exit status 1

Compilation error: ‘ledcAttach’ was not declared in this scope

]]>
By: SébaSAUV https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-1004521 Sun, 02 Feb 2025 01:07:11 +0000 https://randomnerdtutorials.com/?p=75663#comment-1004521 it is necessary to select 16-bit resolution

]]>
By: SébaSAUV https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-1004514 Sun, 02 Feb 2025 00:12:14 +0000 https://randomnerdtutorials.com/?p=75663#comment-1004514 Hello everyone,
I’m trying to generate a 1Hz PWM signal with a 97.5% duty cycle. I can’t do it with these functions. Do you have any ideas, please?

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-987231 Thu, 28 Nov 2024 10:47:25 +0000 https://randomnerdtutorials.com/?p=75663#comment-987231 In reply to Rick.

That’s great.
I’m glad it’s working now.
Regards,
Sara

]]>
By: Rick https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-987167 Thu, 28 Nov 2024 01:55:27 +0000 https://randomnerdtutorials.com/?p=75663#comment-987167 Hi Sara,
Thanks for a quick response. I followed your suggestion and it worked no compiling or issues whatsoever.
Now my project is incorporating the PS3 controller to this Tutorial.
Thanks again
Rick

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-987039 Wed, 27 Nov 2024 11:02:20 +0000 https://randomnerdtutorials.com/?p=75663#comment-987039 In reply to Ricardo.

Hi.
It seems you already have the latest version.
Uninstall the Arduino ESP32 Boards 2.0.18 and the one by Ricardo Quesada. You only need the one by expressif.
Additionally, make sure that you have an ESP32 board selected in Tools > Board when trying to compile an ESP32 code.

Regards,
Sara

]]>
By: Ricardo https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-986939 Tue, 26 Nov 2024 23:49:14 +0000 https://randomnerdtutorials.com/?p=75663#comment-986939 Hi Sara,
Thanks for a quick response. I just want to clarify the ESP32 boards you said I’m using version 2. How do I update to version 3. Currently my ESP32 boards on my library installed is Arduino ESP32 Boards 2.0.18 and ESP32 by Expressif Systems is version 3.07 both installed.
Where do I get the version 3 of ESP32 boards you’re suggesting. Sorry I’m just new to this libraries.
I got this information from my Arduino IDE by typing on my boards manager ESP32 and it populates my boards to 3 boards. Two I mentioned above and the 3rd one is esp32_bluepad32 by Ricardo Quesada.
Thanks
Rick

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-pwm-arduino-ide/#comment-986716 Tue, 26 Nov 2024 14:45:36 +0000 https://randomnerdtutorials.com/?p=75663#comment-986716 In reply to Rick Balazo.

Hi.
Please update your ESP32 boards installation to version 3.
The PWM methods have changed. You must still be running ESP32 version 2.
Let me know if you can solve the issue.
Regards,
Sara

]]>