ESP32-A2DP with PlatformIO #368
-
I wanted to switch over to the PlatformIO extension to VSCode for building the ESP32-A2DP project. Everything went well but I found that I had to add #include <Arduino.h> to the src/main.cpp file prior to the #include "BluetoothA2DPSink.h" or else I received an error that said:
I received this error for both of the platform.ini examples you provided in the example code. I was wondering if this is expected or did I miss a step somewhere. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If I remember right this is a feature of PlatformIO and you need to add #include <Arduino.h> explicitly in your sketch if you want to use functionality from Arduino. I have updated the example... |
Beta Was this translation helpful? Give feedback.
-
Ok, got it. Looks good. Thanks for your kind assistance! |
Beta Was this translation helpful? Give feedback.
If I remember right this is a feature of PlatformIO and you need to add #include <Arduino.h> explicitly in your sketch if you want to use functionality from Arduino.
You might get away if you include an other Arduino library which already has this include. ESP32-A2DP is definitely not one of them because it does not depend on Arduino!
I have updated the example...