Project does not compile anymore with latest esp32 arduino board support. Can you help?

brebisson
Posts: 13
Joined: Fri Dec 22, 2023 9:44 am

Project does not compile anymore with latest esp32 arduino board support. Can you help?

Postby brebisson » Tue Jun 11, 2024 6:57 am

Hello,

I am restarting work on a project that I was working with based on an ESP32-CAM.
I changed PC and had to re-install the arduino system and the ESP board support.

Now, my project does not compile anymore (while it compiles on the old computer when I take it out of storage, but this is not a good solution)...

It seems that the esp API has changed. Could you please help me find how to convert my "old code" to "new code"?

I have 2 set of errors. One around the setup of the LED control
ledcSetup(LED_LEDC_CHANNEL, 5000, 8);
ledcAttachPin(pin, LED_LEDC_CHANNEL);

And one around a HW timer interrupt!
hw_timer_t *timer = timerBegin(0, 80, true); // set timer 0 of 4 to 80 prescaler. No clue on speed...
timerAttachInterrupt(timer, onTimer, true); // attach onTimer to our timer
timerAlarmWrite(timer, 100, true); // timer every 10micros, repeating
timerAlarmEnable(timer); // enable the interrupt


Thanks for your help.
Cyrille

aruffato
Posts: 4
Joined: Mon Feb 27, 2023 3:25 am

Re: Project does not compile anymore with latest esp32 arduino board support. Can you help?

Postby aruffato » Tue Jun 11, 2024 12:38 pm

HI, you MUST update your CODE, because the API change-

See the LINK:
https://docs.espressif.com/projects/ard ... o_3.0.html

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: Project does not compile anymore with latest esp32 arduino board support. Can you help?

Postby lbernstone » Tue Jun 11, 2024 4:28 pm

Migration guide from arduino-esp32 2.x to 3.0

brebisson
Posts: 13
Joined: Fri Dec 22, 2023 9:44 am

Re: Project does not compile anymore with latest esp32 arduino board support. Can you help?

Postby brebisson » Wed Jun 12, 2024 5:38 am

Hello,

Thanks for the link and info...

Is there a way, in arduino systems, to load previous versions of API/board dev so as not to have this type of issues?
I faced the same problem with another project (on an other board)...

Cyrille

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: Project does not compile anymore with latest esp32 arduino board support. Can you help?

Postby lbernstone » Wed Jun 12, 2024 6:55 am

Sure. If you look at the last image in the install doco, you can see there is a drop down box in the board manager to choose the version installed.

Who is online

Users browsing this forum: No registered users and 156 guests