# Compilation error: ‘ledcSetup’ and 'ledcAttachPin' was not declared in this scope please help me

**URL:** <https://forum.sunfounder.com/t/compilation-error-ledcsetup-and-ledcattachpin-was-not-declared-in-this-scope-please-help-me/2976>\
**Category:** General Discussion\
**Created:** [April 3, 2025, 3:24pm UTC](https://forum.sunfounder.com/t/compilation-error-ledcsetup-and-ledcattachpin-was-not-declared-in-this-scope-please-help-me/2976 "2025-04-03T15:24:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [April 3, 2025, 4:48pm UTC](https://forum.sunfounder.com/t/compilation-error-ledcsetup-and-ledcattachpin-was-not-declared-in-this-scope-please-help-me/2976/2 "2025-04-03T16:48:04Z")

</div>

This was reported some time ago by another user. Im not sure if Sunfounder fixed it or not.

This was the original suggestion if it helps?

> [@Please Help - Compilation error: 'ledcSetup' was not declared in this scope](https://forum.sunfounder.com/t/please-help-compilation-error-ledcsetup-was-not-declared-in-this-scope/1382):
>
> I’m working through the ESP32 starter kit and it TUTs this is only the 2nd TUT 2.2 fading LED and i can not get past this. I’ve followed all the steps repeatedly and this keeps happening. C:\Users\tymed\OneDrive\Documents\ESP32\esp32-starter-kit-main\c\codes\2.2\_fading\_led\2.2\_fading\_led.ino: In function ‘void setup()’: C:\Users\tymed\OneDrive\Documents\ESP32\esp32-starter-kit-main\c\codes\2.2\_fading\_led\2.2\_fading\_led.ino:6:3: error: ‘ledcSetup’ was not declared in this scope 6 | ledcSet…

I assume by now it is fixed, but just in case!

---

_[View the full topic](https://forum.sunfounder.com/t/compilation-error-ledcsetup-and-ledcattachpin-was-not-declared-in-this-scope-please-help-me/2976)._
