• 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

Question "ESP32 Course Master and Blink LED" Feedback

Q&A Forum › Category: ESP32 › Question "ESP32 Course Master and Blink LED" Feedback
0 Vote Up Vote Down
David Bailey asked 5 years ago

As a newbie at this, I had to figure why I was getting a “redefinition of ‘const int ledPin'” error when I tried to compile your ESP32 Course Blink_LED.ino file.  If you open a “.ino” file with the Arduino IDE in a directory that as multiple “.ino” files in it, then the Arduino IDE will open all of the “.ino” files in that directory and compile them.  The “Blink_LED” master course subdirectory has a “Blink_LED.ino” and a “Blink_LED_PlatformIO.ino”.  Both files have the line “const int ledPin = 23;”.  Because the Arduino IDE “automatically” attempts to compile all “.ino” files in the directory you will get the “redefinition of ‘const int ledPin'” error.  Even though it was a good lesson in and of itself for me (Arduino IDE quarks), in a course like this, newbies like me should not be having to work through this sort of issue for the very first sample project component hookup project in the course when the solution is simply for the course owner to delete the “Blink_LED_PlatformIO.ino” file or move it into it’s own separate sub-directory.

Question Tags: Blink LED sketch fails to compile - "redefinition of 'const int ledPin'" error
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi David.
I’m sorry for that issue and you’re absolutely right. I’ve never realized we had that issue in our repository.
Thanks for sharing that with us. The issue is now fixed and the repository updated.
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

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition 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.