TheDIYGuy999 / Rc_Engine_Sound_ESP32

Allows to play vehicle engine sounds on an ESP32. Additional sounds can play in parallel with the engine sound! Controls your lights as well. compatible with SBUS, IBUS, PWM, PPM and SUMD signals.
https://www.youtube.com/watch?v=s93yAAmEtbM&t=3s
293 stars 118 forks source link

v9.12 error: 'timerAlarmWrite' was not declared in this scope; #77

Open Bananasmoothie1975 opened 3 weeks ago

Bananasmoothie1975 commented 3 weeks ago

On compiling v9.12 (actually now all versions I've tried), error of:

error: 'timerAlarmWrite' was not declared in this scope; did you mean 'timerWrite'?

for all instances of 'timerAlarmwrite'.

Using IDE v2.3.2, ESP32Devkit1 board. Have also had some issues with not finding folders, particularly "soc" folder which i can't find anywhere using File Explorer either. EDIT: Found the "soc" folder on an old drive from previous work. Thanks

Bananasmoothie1975 commented 3 weeks ago

Looks like it's something to do with this (scroll to the Timer section):

https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html#compilation-flags

Do I have to replace ALL the different API's or is there some sort of code auto update function?

EDIT: Not ideal, but I found a workaround: I had to install the previous Espressif ESP32 API (v2.xxxx, down from v3.03) using Board Manager so the timer functions etc were correct.

TheDIYGuy999 commented 3 weeks ago

Use VS Code with PlatformIO instead of Arduino

Bananasmoothie1975 commented 3 weeks ago

Use VS Code with PlatformIO instead of Arduino

Firstly, thanks for you reply and for all the effort in your RC controller, I have enjoyed all the videos and years ago built a PWM version for my HG P407 RC (modded to suit my own requirements) :D

I've now worked my way to a compileable sketch, I had to install the previous Espressif ESP32 API (v2.xxxx, down from v3.03) so the timer functions etc were correct.

I did download the VS Code software, but I have no idea what it does or how to use it :s

I'm now at the point of trying to get the SBUS working through my Flysky i6X and iA10B Rx, the serial monitor isn't showing any channel info, just EEPROM and core reg dump stuff but none of the individual channel stuff even shows up (none of the channel serialprint info). SBUS to pin36 ("VP") if that helps.

FYI, I'm trained in mechanical systems, not electronics/code, but learning ;)

TheDIYGuy999 commented 3 weeks ago

This means it's compiling but crashing anyway. You need to use the correct, even older Espressif API. You should watch some VS Code tutorials and you will see it's way easier than Arduino, because it's installing all the correct API's and libraries automatically for you.