Hi Rui,
Is there any library to add to VS Code IDE to compile ESP32 with PWM? I tried to compile the code provide by https://raw.githubusercontent.com/RuiSantosdotme/ESP32-Course/master/code/LED_PWM_Example_2/LED_PWM_Example_2.ino,
but there isn’t definition to ledcSetup, ledcWrite and ledcAttachPIn functions. This code run perfectly when we use the Arduino IDE.
3 Answers
Hi Jose.
When using VS Code to program your boards, you always need to include this line at the beginning of your code:
#include <Arduino.h>
Tell me if this solves your issue.
Regards,
Sara
Thank you very much, Sara.
You fixed it. As I suspected, it was one more beginner’s mistake.
Regards,
Jose