Asked

Compilation Error With Doit ESP32 Dev Kit 1

Hello DJ,

I'm encountering a compilation error while following the tutorial to convert the ESP-32 into an EZ-B, approximately 10:49 into the video. The error seems to be related to the ESP32PWM.cpp file and involves several undeclared functions and incorrect event identifiers. Below is a screen capture of the error message:

User-inserted image

Here is the error message I'm receiving:

C:\Users\mstep\Documents\Arduino\EZ-ESP32\ESP32PWM.cpp: In destructor 'virtual ESP32PWM::~ESP32PWM()':
C:\Users\mstep\Documents\Arduino\EZ-ESP32\ESP32PWM.cpp:50:17: error: 'ledcDetachPin' was not declared in this scope; did you mean 'ledcDetach'?
   50 |                 ledcDetachPin(pin);
      |                 ^~~~~~~~~~~~~
      |                 ledcDetach

The error continues with similar issues, such as:

  • ledcSetup not being declared.
  • Incorrect event identifiers like SYSTEM_EVENT_WIFI_READY instead of WIFI_EVENT_WIFI_READY.
  • Ambiguous call of analogWrite.

It seems like there might be a mismatch in the function declarations or possibly an issue with the library versions being used. Could you provide any guidance on how to resolve these errors?

Thank you for your assistance!


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

PRO
Synthiam
#2   — Edited

The issue you'll run into is that the library changes constantly. You're treading into the open-source territory, which is the wild west. People can submit changes because they dislike how something was spelled. That breaks everyone's code moving forward. It's the argument between "what works" vs. "what is esthetically pleasing to the author(s)." Programming stopped being about completing a task and now is a superficial art to programmers, and in the open source community, doubly so. Because of that, updates break everything.

I can take a look for you, but you'd probably have better luck looking at my video and installing the same version of the esp32 library. The newer library probably breaks everything.

PRO
Synthiam
#4  

I updated the firmwares for the ESP to work with the current latest esp32 libraries. i listed the versions because in the future that's the version you'll want to use if you don't find the latest compatible. It's too much work to maintain code bases for open source projects that change a variable name because they don't like it - even though it'll break everyone else's programs. lol