I have been trying to get the "sd_card" example provided in the "esp-idf" library to run on my ESP32 LyraT 3.4
I am very new to the C++ environment and ESP32 Development. I have successfully installed both esp-idf and esp-adf frameworks. I have been able to compile and run many of the provided esp-adf example programs. However, I am trying to write an application that uses POSIX and C standard library functions to work with files on the sd card and all the examples for the LyraT board utilize streams that I don't yet fully understand.
I do understand the method used to initialize the sd card that is built into the LyraT board is different than external sd cards that are attached to non audio boards. I tried to copy/paste the "audio_board_sdcard_init" function from the board.c program located in the esp-adf/components/audio_board/lyrat_v4_3 library, and put that code in the "sd_card" example program, but I can't seem to make that work.
Would someone please point me in the right direction?
Thanks in advance for any assistance.
Mike
Running the sd_card example (in esp-idf) on ESP32 LyraT 3.4
Running the sd_card example (in esp-idf) on ESP32 LyraT 3.4
Last edited by mlablan1 on Sun Feb 19, 2023 8:25 pm, edited 1 time in total.
-
- Posts: 125
- Joined: Fri May 24, 2019 2:02 am
Re: Running the sd_card example (in esp-idf) on ESP32 LyraT 3.4
You need to be more explicit in your question/problem or you will not get an answer.
Re: Running the sd_card example (in esp-idf) on ESP32 LyraT 3.4
@felixcollins,
Thank you for your advice. Since I received no other replies I guess you are correct, I was not explicit enough with my request for information.
I did some more reading/experimenting on my own and moved over to the Arduino IDE programming environment.
In that toolchain I figured out that the pin assignments for the SD Card on the LyraT board are not the default that the IDE has coded in the pins_arduino.h file located here ".../Arduino/hardware/espressif/esp32/variants/espino32/pins_arduino.h". After I edited the the pin assignments as documented below, the SD Card example programs worked fine.
--------------OLD----NEW
MOSI---------23------15
MISO---------19-------2
SCK/CLK----18-------14
SS/CS---------5-------13
This post can be closed.
Thank you for your advice. Since I received no other replies I guess you are correct, I was not explicit enough with my request for information.
I did some more reading/experimenting on my own and moved over to the Arduino IDE programming environment.
In that toolchain I figured out that the pin assignments for the SD Card on the LyraT board are not the default that the IDE has coded in the pins_arduino.h file located here ".../Arduino/hardware/espressif/esp32/variants/espino32/pins_arduino.h". After I edited the the pin assignments as documented below, the SD Card example programs worked fine.
--------------OLD----NEW
MOSI---------23------15
MISO---------19-------2
SCK/CLK----18-------14
SS/CS---------5-------13
This post can be closed.
-
- Posts: 125
- Joined: Fri May 24, 2019 2:02 am
Re: Running the sd_card example (in esp-idf) on ESP32 LyraT 3.4
Thanks for reporting back! This may help someone else in future.
Who is online
Users browsing this forum: Google [Bot] and 71 guests