Open richonguzman opened 3 days ago
Copies of all used example libraries are placed in the lib directory
“Audio.h” is here https://github.com/Xinyuan-LilyGO/T-Deck/tree/master/lib/ESP32-audioI2S
Copies of all used example libraries are placed in the lib directory
“Audio.h” is here https://github.com/Xinyuan-LilyGO/T-Deck/tree/master/lib/ESP32-audioI2S
should this also work if using Platformio instead of Arduino IDE ?
Of course it works. There is no difference between the two except the way they are built.
I copy all the "ESP32-audioI2S" folder into /lib folder of my project.
then I compile in Platformio with this:
`
namespace AUDIO_Utils {
void setup() {
// nothing yet
}
}
I get :
/Users/myUserName/.platformio/packages/framework-arduinoespressif32@3.20009.0/libraries/SD_MMC/src/SD_MMC.h:21:10: fatal error: FS.h: No such file or directory
even adding: #include "FS.h" it still get this error and could not go further
Post your platfromio.ini
[env:ttgo_t_deck_plus] framework = arduino monitor_speed = 115200 lib_ldf_mode = deep+ platform = espressif32 @ 6.3.1 board_build.partitions = huge_app.csv monitor_filters = esp32_exception_decoder board = esp32-s3-devkitc-1 board_build.mcu = esp32s3 build_flags = ${common.build_flags} -Werror -Wall ${common.usb_flags} -D TTGO_T_DECK_PLUS -D BOARD_HAS_PSRAM -D HAS_SX1262 -D GPS_BAUDRATE=38400 -D HAS_TFT -D USER_SETUP_LOADED -D ST7789_DRIVER -D TFT_WIDTH=240 -D TFT_HEIGHT=320 -D TFT_RGB_ORDER=TFT_BGR -D TFT_INVERSION_ON -D TFT_MISO=38 -D TFT_MOSI=41 -D TFT_SCLK=40 -D TFT_CS=12 -D TFT_DC=11 -D TFT_RST=-1 -D TFT_BUSY=-1 -D TFT_BL=42 -D TFT_BACKLIGHT_ON=1 -D TOUCH_CS=-1 -D LOAD_GLCD -D LOAD_FONT2 -D LOAD_FONT4 -D LOAD_FONT6 -D LOAD_FONT7 -D LOAD_FONT8 -D SPI_FREQUENCY=40000000 -D SPI_READ_FREQUENCY=16000000 lib_deps = adafruit/Adafruit BusIO @ 1.16.1 adafruit/Adafruit Unified Sensor @ 1.1.14 adafruit/Adafruit BME280 Library @ 2.2.4 adafruit/Adafruit BMP280 Library @ 2.6.8 adafruit/Adafruit BME680 Library @ 2.0.4 bblanchon/ArduinoJson @ 6.21.3 h2zero/NimBLE-Arduino @ 1.4.1 jgromes/RadioLib @ 6.6.0 mathieucarbou/AsyncTCP @ 3.2.5 mathieucarbou/ESPAsyncWebServer @ 3.2.3 mikalhart/TinyGPSPlus @ 1.0.3 paulstoffregen/Time @ 1.6.1 peterus/esp-logger @ 1.0.0 shaggydog/OneButton @ 1.5.0 bodmer/TFT_eSPI @ 2.5.43
Yours is too complicated, I added a simple playback example
You can try adding this in lib_deps = esphome/ESP32-audioI2S@2.0.6
You can try adding this in lib_deps = esphome/ESP32-audioI2S@2.0.6
added "esphome/ESP32-audioI2S @ 2.0.6" in lib_deps (and deleted the other from "/lib")
compiled just to test without adding any more code than before and same:
"In file included from /Users/ricardoguzman/.platformio/packages/framework-arduinoespressif32@3.20009.0/libraries/SD_MMC/src/SD_MMC.cpp:16: /Users/ricardoguzman/.platformio/packages/framework-arduinoespressif32@3.20009.0/libraries/SD_MMC/src/SD_MMC.h:21:10: fatal error: FS.h: No such file or directory"
^~~~~~
compilation terminated. Compiling .pio/build/ttgo_t_deck_plus/lib735/SPIFFS/SPIFFS.cpp.o *** [.pio/build/ttgo_t_deck_plus/libabd/SD_MMC/SD_MMC.cpp.o] Error 1
It seems that there is a problem with the platformio index and it cannot find the correct dependencies.
There is no problem running it alone
It seems that there is a problem with the platformio index and it cannot find the correct dependencies.
There is no problem running it alone
how could I add this "alone"??
In my example, it is normal https://github.com/Xinyuan-LilyGO/T-Deck/commit/7aa23db0230ce803f3efe6043ed15ad7d1eeb431
I was wondering why this avatar looks so familiar, it turns out to be you again. Hahahaha
I just tested it in your project, please fork a fork, comment out the following header file, and it can be compiled normally. This must be caused by a problem with the reference of platformio
In my example, it is normal 7aa23db
I was wondering why this avatar looks so familiar, it turns out to be you again. Hahahaha
I just tested it in your project, please fork a fork, comment out the following header file, and it can be compiled normally. This must be caused by a problem with the reference of platformio
sorry to push so much lately but I'm willing to make lots of upgrades for this!!! 😃
so: 1) library import on platformio.ini is now : esphome/ESP32-audioI2S @ 2.0.7 2) edited the library without "SD_MMC.h" and others. 3) have to add "es7210" folder from T-Deck main to my own /lib
now it can be added a mp3 and plays:
but I have 2 issues: 1) is the quality of the mp3 defined as a minimum to be listened fine? 2) when the board finishes playing the audio it make a noise when it stops
- What does it mean when you make a sound when you stop? How do you run it?
void playMP3(const String& filename) { bool findMp3 = false; findMp3 = audio.connecttoFS(SPIFFS, filename.c_str()); if (findMp3) { audio.setVolume(21); while (audio.isRunning()) { audio.loop(); // delay(3); } /*audio.setVolume(0); delay(10); audio.stopSong(); delay(50);*/ //audio.stop(); } }
non of this posible added mods allow me to play a mp3 and avoid the 0,5sec crack sound when play stops
I didn't notice any popping sounds when I ran it. Does this have anything to do with the audio file?
tried using the "Audio.h" for playing a mp3 file through T-deck speaker, but cant find a way to even import libraries needed on platformio to make use of the speaker play.
any small guide as which library to use?