Skip to content

error: 'ledcSetup'  #10309

@LuizGuilhermeSilvaa

Description

@LuizGuilhermeSilvaa

Board

ESP32 - WROOM 32 DEVKITV1

Device Description

It's the esp32 with the cp210x driver chip

Hardware Configuration

It's not connected to anything

Version

v3.0.4

IDE Name

Arduino IDE

Operating System

Windows 10

Flash frequency

80mhz

PSRAM enabled

no

Upload speed

921600

Description

I also can't use pwm because of a bug in the esp32 library.

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

Sketch

C:\Users\Guilherme\AppData\Local\Temp\.arduinoIDE-unsaved202488-11868-4gnakt.nmbmy\sketch_sep8c\sketch_sep8c.ino: In function 'void setup()':
C:\Users\Guilherme\AppData\Local\Temp\.arduinoIDE-unsaved202488-11868-4gnakt.nmbmy\sketch_sep8c\sketch_sep8c.ino:8:3: error: 'ledcSetup' was not declared in this scope
    8 |   ledcSetup(pwmChannel, freq, resolution);
      |   ^~~~~~~~~
C:\Users\Guilherme\AppData\Local\Temp\.arduinoIDE-unsaved202488-11868-4gnakt.nmbmy\sketch_sep8c\sketch_sep8c.ino:11:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
   11 |   ledcAttachPin(ledPin, pwmChannel);
      |   ^~~~~~~~~~~~~
      |   ledcAttach

exit status 1

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

Debug Message

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

Other Steps to Reproduce

I was trying to use a "dabble" library, but right after compiling it gives an error.

I came to the conclusion that it was a bug in the library because I uninstalled it and installed another Arduino library, and even though the code didn't pass because it was incompatible, I just compiled it and there was no error.

Captura de tela 2024-09-08 210043

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.0 migrationIssue relates to migration from 2.X to 3.X versionType: QuestionOnly question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions