Issues getting an Arduino Nano Every to play nice with peripherals

Howdy y'all!

I'm working on a project that I thought would be pretty plug and play, but I'm having a lot of trouble getting it off of the ground. The basic idea is that I want to voice command an arduino board to tell an mp3 player to play a specific track.

For this project I am using the Arduino Nano Every, SpeakUp Click, and DFPlayerMini. See rough wiring guide below
image

I'm relatively weak at coding, and haven't done an Arduino project in about 4 years, but thought I did an alright job researching and setting up communications between these devices. Below is the code I'm running.

#include <Arduino.h>
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>
//software serial only supports 1 false I/O at a time. I can use the real Rx, Tx along with the software serial to keep this thing schmovin

SoftwareSerial MiniPlayer(11, 12); // RX, TX | Defining which pins are receipt and transmit for the DFPlayer

DFRobotDFPlayerMini VoiceOut; //Giving a variable name for DFRobotDFPlayerMini library to work through

char incomingByte; // Defining the first byte received from SpeakUp Click
char incomingByte1; // Our boy SpeakUp sends 2 bytes, we only want to process one fully so we have this separator

void setup(){
  MiniPlayer.begin(9600); //begin read/write for the software serial connected to the DFPlayer
  Serial.begin(9600); //begin read/write for the hardware serial connected to the SpeakUp Click 
  
  
//Just a little config section for the DFPlayer
  VoiceOut.volume(20);  //Set volume value. From 0 to 30
   //----Set different EQ----
  VoiceOut.EQ(DFPLAYER_EQ_NORMAL);
//  VoiceOut.EQ(DFPLAYER_EQ_POP);
//  VoiceOut.EQ(DFPLAYER_EQ_ROCK);
//  VoiceOut.EQ(DFPLAYER_EQ_JAZZ);
//  VoiceOut.EQ(DFPLAYER_EQ_CLASSIC);
//  VoiceOut.EQ(DFPLAYER_EQ_BASS);

  VoiceOut.outputDevice(DFPLAYER_DEVICE_SD);
 Serial.println("ready for commands");
}
void loop() {
/////

if (Serial.available() > 1) {
               // read the incoming byte:
                incomingByte = Serial.read();
                incomingByte1 = Serial.read();
                Serial.print ("Received data = ");
                Serial.print(int(incomingByte) ,HEX);
                Serial.println(int(incomingByte1) ,HEX);


if (incomingByte == 0){ // First MP3
Serial.println ("Command: MP3 1 "); //only here for debuggin
VoiceOut.play(1);  //Play the first mp3              
                }

From this code I receive literally no output, not even the println of "ready for command." All I receive is a backwards question mark. No change of or updating of anything in the output menu when I speak to the SpeakUp Click, and I'm frankly really lost here. Any help would be greatly appreciated!

Can’t read the image. A schematic with readable pin names / number would be easier to grasp (thanks for the effort though)

Have you connected your voice module on the Serial Rx/Tx of your arduino? If so it will conflict with the serial monitor

If not, check that your serial monitor is opened at 9600 bauds

The max current you get out of the 3.3V pin of this Nano is 50mA. Does your module need more?

1 Like

You're mistaken with a Nano; a Nano Every has Serial1 on the TX/RX pins.

Note that I have no experience with either the Nano Every or the player but why use SoftwareSerial if you have an additional HardwareSerial port (Serial1)?

1 Like

right my bad :disappointed:

OP is using the Serial monitor and 2 UART driven devices (SpeakUp Click which I don’t know, and DFPlayerMini) so needs 3 Serial ports

And I might have missed that :wink:

The serial monitor is the window you open with ctrl+shift+m, correct? That was set to 9600 bauds.

Should I then be using Serial1.begin instead of Serial.begin for the TX/RX pins? If the problem is that simple I'll be so relieved, and a little bit embarrassed. Having just tested to see if that code would compile it looks like it will. I'll post an update in about 13 hours when I get home and can try it again!

Thank you so much for both of your help!

Update: Serial to communicate to computer, Serial 1 to communicate with peripheral, program now works as intended.

good ! thanks for reporting back
have fun!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.