how to use both DFminiplayer and LCD

Hello,

I successfully connected a LCD to my Arduino and succeeded in saying hello to the world.
I also succeeded in installing, programming and using the mp3 DFminiplayer.

my wish:
I would like to use both the LCD and the DFminiplayer on the same Arduino.

problem:
both the LCD and the DFminiplayer use D10, D11 (SPI ports)

question:
how do I connect the LCD and the DFminiplayer? use RX / TX for the LCD? Use D10 and D11 for both?

Any help is appreciated.

Robert

There are many many different LCDs. Which one do you have.

Post a diagram of how everything is connected.

Which Arduino?

Post your best effort at the code. Read the forum guidelines to see how to post code.

The DFPlayerMini uses serial/softwareserial, not SPI. See this lib/tutorial.

@groundFungus
I use an Arduino Uno R3 and a 20x4 LCD: 2004A.

I rewired and managed to change the pins of LCD:

  • RS of the LCD => pin D5
  • E of the LCD => pin D6

The LCD still works fine. So I can use pin10 en pin11 for the MP3 DFminiplayer.

@Power_Broker
You are right. I guess I can use any pin as long as it is PWM. Any way: D10 and D11 on my Arduino are not used by the LCD anymore.

Problem solved: thank you!

Problem solved

Not truly. The true problem is that you did not understand how the two devices need to be connected and which pins they can use, and, judging from your post above, you still don't understand. You mentioned SPI ports, but neither of these two devices use SPI, so those pins were simply used as ordinary digital outputs, like any other digital outputs. Either of your devices can use any pins. Neither require SPI or PWM pins.

@PaulRB

the DFminiplayer did not work in the following configuration:

  • DFPlayer RX to pin D11 of the Arduino
  • DFplayer TX to pin D12of the Arduino

The problem is solved for me because it is working and I am happy it is.

The problem is not solved, because I do not understand exactly why the other configuration is not working.

@PaulRB

I cannot reproduce the DFminiplayer problem:
the DFminiplayer did not work in the following configuration:

DFPlayer RX to pin D11 of the Arduino
DFplayer TX to pin D12of the Arduino

Maybe I swapped RX and TX in the software...
But I agree: there should be no reason why it could not be working.

I do understand now: on the Arduino I can use any digital pin for TX and RX of either the DFminiplayer or the LCD.