How to change the wiring on the AudioSourceSdFat class? #402
-
I'm using your player-sdfat-a2dp example with a MakePython ESP32 and audio board, and have been successful. However, I had to use wires to connect the ESP32 to the board to match the specifications in your example, as the board and ESP32 don't match up to how you describe here: https://github.com/pschatzmann/arduino-audio-tools/tree/main/examples/examples-player/player-sdfat-a2dp. I was wondering if there was a way for me to change this to suite my needs. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Sure, why don't you just remap the pins so that they match with your board?
|
Beta Was this translation helpful? Give feedback.
-
So if I have something like this: #include "AudioTools.h" #define PIN_AUDIO_KIT_SD_CARD_CS 22 const char startFilePath="/"; AudioKit kit; void setup() { SPI.begin(PIN_AUDIO_KIT_SD_CARD_CLK, PIN_AUDIO_KIT_SD_CARD_MISO, PIN_AUDIO_KIT_SD_CARD_MOSI, PIN_AUDIO_KIT_SD_CARD_CS); auto cfg = out.defaultConfig(TX_MODE); // setup player void loop() { How would I apply the remapping to the player? |
Beta Was this translation helpful? Give feedback.
-
So I would define the pins and then pass them to AudioSourceSDFAT using SdSpiConfig? |
Beta Was this translation helpful? Give feedback.
-
I don't see anything that is wrong, but I don't understand why you make your life so complicated. Since you already use the standard SPI pins, why don't you use the standard CS pin as well ? In addition I suggest that you consider this: https://github.com/pschatzmann/arduino-audio-tools/wiki/It's-not-working |
Beta Was this translation helpful? Give feedback.
-
I don't see any reason why this should not work - after all the same approach works perfectly with the AudioKit. As described in the link you should have the SD first working outside of my library!
You should ask the supplier of your hardware or the provider of the different SD libraries for help because this has nothing to do with my audio library: I am pretty sure that your problem has already been solved if you search at the right place... |
Beta Was this translation helpful? Give feedback.
Sure, why don't you just remap the pins so that they match with your board?