GPIO pins missing error codes

MikeDee
Posts: 1
Joined: Sun Oct 08, 2023 11:32 am

GPIO pins missing error codes

Postby MikeDee » Sun Oct 08, 2023 11:57 am

Been getting a GPIO error code after the last ESP-IDF update with the TFT_eSPI library on the Arduino IDE so I switched to VCS and similar error happen on that also. I eliminated the TFT library with a simple PWM code and another GPIO error cam up.

This is the code I wrote:

int value = 255;

void setup() {
ledcSetup(0, 10000, 8);
ledcAttachPin(38, 0);
ledcWrite(0, value);
}

void loop(){
}

This is the error I get:

C:\Users\mdall\AppData\Local\Temp\.arduinoIDE-unsaved202398-16772-502385.xerex\sketch_oct8a\sketch_oct8a.ino: In function 'void setup()':
C:\Users\mdall\AppData\Local\Temp\.arduinoIDE-unsaved202398-16772-502385.xerex\sketch_oct8a\sketch_oct8a.ino:6:3: error: 'ledcSetup' was not declared in this scope
6 | ledcSetup(0, 10000, 8);
| ^~~~~~~~~
C:\Users\mdall\AppData\Local\Temp\.arduinoIDE-unsaved202398-16772-502385.xerex\sketch_oct8a\sketch_oct8a.ino:7:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
7 | ledcAttachPin(38, 0);
| ^~~~~~~~~~~~~
| ledcAttach

exit status 1

Compilation error: 'ledcSetup' was not declared in this scope

Am I doing something wrong or missing something?

Sorry I am new to coding and microcontrollers.

Who is online

Users browsing this forum: rsimpsonbusa and 87 guests