'AnalogAudioStream' does not name a type #1871
-
I'm attempting to use the "streams-adc-serial" sketch from arduino-audio-tools-1.0.1 on an ESP32-S3 and having trouble with the AnalogAudioStream type. I get the error "'AnalogAudioStream' does not name a type". Removing the type assignment and related code, the sketch compiles successfully. I can also compile other sketches that don't use the type. Attempting to trace the reason for the problem, I see "#if defined(USE_ANALOG)" in AnalogAudioStream.h and have added "#define USE_ANALOG" before "#include AudioTools.h", which results in AnalogAudioStream resolving but leads to a different error:
I see some discussion here with a similar missing file error (soc/dac_channel.h), but it seems to be a different problem: pschatzmann/arduino-audiokit#24 I'm not sure what to do at this point, since it seems like the sketch should compile without modification. What do I need to do to get the "streams-adc-serial" sketch to work? Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I can compile this sketch with the actual Arduino ESP32 core 3.1.1 w/a any problems. Please don't use the obsolete 2.x releases any more! You could have saved this disucssion by following the advice given in the Wiki! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply Phil! I did not see the change from 2 weeks ago in the "Its not working" wiki page stating the need to use version 3 of the Arduino library. I have used recommendations on that page to good effect in the past and did not anticipate that it would be updated with a change like this; will start there in the future... For those of us using PlatformIO, note that the latest version has Arduino 2.0.17: https://github.com/platformio/platform-espressif32/releases The pioarduino fork of PlatformIO has Arduino version 3.11 and is dedicated to keeping up to date: https://github.com/pioarduino/platform-espressif32 (see also https://gist.github.com/sivar2311/5125011eaaf859eff90c4b502e1408b1) In VS Code, I uninstalled the PlatformIO extension, installed the pioarduino extension, and added this to platformio.ini: Cheers, |
Beta Was this translation helpful? Give feedback.
I can compile this sketch with the actual Arduino ESP32 core 3.1.1 w/a any problems.
Even the older 3.0.7 release works as well...
Please don't use the obsolete 2.x releases any more!
You could have saved this disucssion by following the advice given in the Wiki!