TMRpcm icon indicating copy to clipboard operation
TMRpcm copied to clipboard

Stereo 2pins not working

Open MiguelCoelhoua opened this issue 2 years ago • 4 comments

I'm trying to play a stereo file, but only audio is coming out of one pin (pin 9). When I pinMode(10,OUTPUT) the SDcard gives fail. I'm using a shield for the arduino uno.

MiguelCoelhoua avatar Sep 06 '22 14:09 MiguelCoelhoua

I’m goin to guess that your shield uses pin 10 for the SD card so it’s likely you can’t use stereo mode with that shield

On Sep 6, 2022, at 8:30 AM, MiguelCoelhoua @.***> wrote:

 I'm trying to play a stereo file, but only audio is coming out of one pin (pin 9). When I pinMode(10,OUTPUT) the SDcard gives fail. I'm using a shield for the arduino uno.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

TMRh20 avatar Sep 06 '22 16:09 TMRh20

I read that in the shield datasheet it said this: "Arduino communicates with both the W5500 and the SD card using the SPI bus (through the ICSP header). This is on digital pins 10, 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega (...) and pin 4 for the SD card." Even if I can't use pin 10, I can't set another pin with outuput like for example 6 or 5. Like audio.speakerPin =9; pinMode(5,OUTPUT);

MiguelCoelhoua avatar Sep 06 '22 16:09 MiguelCoelhoua

I’m goin to guess that your shield uses pin 10 for the SD card so it’s likely you can’t use stereo mode with that shield On Sep 6, 2022, at 8:30 AM, MiguelCoelhoua @.***> wrote:  I'm trying to play a stereo file, but only audio is coming out of one pin (pin 9). When I pinMode(10,OUTPUT) the SDcard gives fail. I'm using a shield for the arduino uno. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

I read that in the shield datasheet it said this: "Arduino communicates with both the W5500 and the SD card using the SPI bus (through the ICSP header). This is on digital pins 10, 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega (...) and pin 4 for the SD card." Even if I can't use pin 10, I can't set another pin with outuput like for example 6 or 5. Like audio.speakerPin =9; pinMode(5,OUTPUT);

MiguelCoelhoua avatar Sep 11 '22 15:09 MiguelCoelhoua

The speaker pins are specific to the device, On the Mega, you can use 5-2,6-7,11-12,46-45 but on Uno, Nano,etc devices, you can only use pins 9 and 10.

TMRh20 avatar Sep 11 '22 16:09 TMRh20