Project does not compile anymore with latest esp32 arduino board support. Can you help?
Posted: 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
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