@jremington Thanks for the confirmation. I may be misunderstanding something about the installation process. On the ReadMe.md There's a link to an Espressif page Installing (Windows, Linux and macOS) which provides the Boards Manager JSON for the ESP32. I already have that and figured that was sufficient to be up-to-date.
Seems like I'm not understanding how to be even more update.
...except... I'm not the one using any of these commands. The use of ledcSetup and ledcAttachPin and the consequent errors is happening in ~/Documents/Arduino/libraries/ESP32_AnalogWrite/analogWrite.cpp. So it does seem it's not about re-coding anything on my end but rather updating the ESP32 library. And that's the part I'm apparently not seeing.
I'm guessing it's This Library on GitHub that needs to be updated with the new API. If you look at the REAMDME there, you'll see:
So, I'm guess you'll either have to update it yourself or downgrade back to ESP32 Arduino Core 2.x.
Hi @WhatsYourFunction. As already mentioned by @gfvalvo, you have three options for dealing with this problem:
Make the necessary changes in the source code of the "ESP32_AnalogWrite" library to make it compatible with the breaking changes introduced in the 3.0.0 release of the "esp32" boards platform.
Don't use the incompatible "ESP32_AnalogWrite" library in your sketch
Use the last compatible version of the "esp32" boards platform, from before the breaking changes were introduced in the platform.
The most simple of these will be the third. In case you chose that one, I'll provide instructions you can follow to do it:
Select Tools > Board > Boards Manager... from the Arduino IDE menus.
The "Boards Manager" dialog will open.
Wait for the updates to finish, as shown by the messages printed at the bottom of the "Boards Manager" dialog.
Scroll down through the list of boards platforms until you find the "esp32" entry. Click on it.
A "Select version" dropdown will appear in the entry.
Click on the "Select version" dropdown.
It will expand.
Select "2.0.17" from the menu.
Click the "Install" button in the "esp32" entry.
Wait for the installation to finish.
Click the "Close" button on the "Boards Manager" dialog.
The "Boards Manager" dialog will close.
Now compile your sketch again. Hopefully this time the error will not occur and the library will work as expected.
Arduino IDE will occasionally notify you that a new version of the boards platform is available, you'll need to refrain from accepting the offer that will cause an update back to the problematic version of the platform. If you find these notifications annoying, you can disable them via the IDE preferences.
I'll provide instructions you can follow to do that:
Select File > Preferences... (or Arduino > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to "Check for updates on startup" in the "Preferences" dialog.
Click the "OK" button.
The "Preferences" dialog will close.
If you disable the automatic update check, make sure to periodically do a manual check for newer versions of the installed boards platforms and libraries that you want to keep updated. You can check for new versions of Arduino IDE by selecting Help > Check for Arduino IDE Updates from the Arduino IDE menus. You can check for new versions of boards platforms and libraries by selecting "Updatable" from the "Type" menu in the Boards Manager and Library Manager views.