• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Project_Robot error ledcsetup

Q&A Forum › Category: ESP8266 › Project_Robot error ledcsetup
0 Vote Up Vote Down
ANDRES GIRALDO asked 4 years ago

Hello guys I hope you are doing very well. I was doing the car robot project and the code throws me the variable error. Could you help me what is missing in the declaration
Im using esp8266 
wifi_robot:51:3: error: ‘ledcSetup’ was not declared in this scope
51 | ledcSetup(pwmChannel, freq, resolution);
 
wifi_robot:54:3: error: ‘ledcAttachPin’ was not declared in this scope
54 | ledcAttachPin(enable1Pin, pwmChannel);
 
wifi_robot:58:3: error: ‘ledcWrite’ was not declared in this scope
58 | ledcWrite(pwmChannel, dutyCycle);
 

4 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
Make sure that you have an ESP32 board selected before compiling the code.
Does it work?
Regards,
Sara

0 Vote Up Vote Down
ANDRES GIRALDO answered 4 years ago

https://drive.google.com/file/d/1vG1X377ltxgZmJKg76T8ic9lx4PxuEZN/view?usp=sharing
 

f I have the module selected correctly. In addition, I had already compiled other projects
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
From the printscreen you shared, I can see you have a Generic ESP8266 Module selected.
Go to Tools > Board and select an ESP32 board.
Regards,
Sara
 

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Does it work now?
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.