GithubHelp home page GithubHelp logo

jq6500_serial's Introduction

JQ6500_Serial

Simple to use Arduino library to interface to JQ6500 (JQ6500-28P, JQ6500-16P) Mp3 Player Modules

For complete documentation about the JQ6500 Mp3 Player Module, see: https://sparks.gogo.co.nz/jq6500/index.html

For a library methods reference see: https://sleemanj.github.io/JQ6500_Serial/html/index.html

For Linux Upload and Windows Upload Repair Tool (JQ6500-16) see: https://github.com/NikolaiRadke/JQ6500-rescue-tool

Download, Install and Example

  • Download: https://sparks.gogo.co.nz/JQ6500_Serial.zip
  • Open the Arduino IDE (1.0.5)
  • Select the menu item Sketch > Import Library > Add Library
  • Choose to install the JQ6500_Serial.zip file you downloaded
  • Now you can choose File > Examples > JQ6500_Serial > HelloWorld

Connecting To Your Arduino

Pinout image of JQ6500-16p MP3 Player Module For Arduino

Pinout image of JQ6500-28p MP3 Player Module For Arduino

There are two varients of the JQ6500 module as shown.

To use this library with a 5v Arduino, connect as follows.

JQ6500 Module Arduino
RX through a 1K Resistor then to pin 9
TX pin 8
GND (any of) GND
VCC (any of) VCC

To use this library with a 3v3 Arduino, connect as follows...

JQ6500 Module Arduino
RX pin 9
TX pin 8
GND (any of) GND
VCC (any of) VCC

You can use pins other than 9 and 8 if you wish, simply set them in your code.

Power Demands

If using the on-board speaker driver, then naturally the power demands are significant, and your USB power may not be sufficient at more 1/3rd level of volume or so, the symptom is the audo breaking up and potentially resetting when volume increases.

You should use either an external power source, an external amp, or a lower volume if you experience this problem.

Usage

JQ6500 instance and serial connection

Define a new instance of JQ6500_Serial, passing the serial connection the module is connected to.

You can use any Serial libraries that implement a Stream object, for example:

Hardware serial connection (see PlayByNumber example):

JQ6500_Serial mp3(Serial);
[...]
Serial.begin(9600);

Software serial connection (see other examples):

#include <SoftwareSerial.h>
SoftwareSerial mySerial(RX_PIN, TX_PIN);
JQ6500_Serial mp3(mySerial);
[...]
mySerial.begin(9600);

jq6500_serial's People

Contributors

gutierrezps avatar lucadentella avatar sleemanj avatar thijstriemstra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jq6500_serial's Issues

ESP8266 and ESP32 Arduino compatibility

Program compiles fines but use the standard Arduino SoftwareSerial (wrote specificaly for avr chipset). very little modification is needed to make the compilation conditional and allow the use of espSoftwareSerial when compiling for this platform.
I made a merge request for this case.

JQ6500 Flash Size

Hello,
I'm currently working with 50 JQ6500 and I'm using sleemanj lib. that works great.
But it is not clear what the Flash Size of the module. Is there a command to know what is it ?
Mine is a 25L1606E model, I thought it was 2 MB but it seems less. 1MB seems okay, I'm about to test more.
Upload and adjust soundfiles duration is a boring user job for a test. A request to the JQ for Flash size would be easier. Please tell me if this is not the right place to ask this.

Solution for missing upload software

Dear James,

at first, thanks for your great work!

Most of the 32MBit modules (i reckon every module) brought from ebay come without the upload sortware. Me and several other users tried out your software with the modified config.ini, but it's still not working (Windows 10). It seems like the software has to be on-chip.

Another user wrote a great Linux tool to upload MP3 files and even flash a new (patched) MusicDownload.iso onto the module. It's working great!

Since there are a lot of users without any Linux experience, i decided to create a small (20 MB) bootable ISO-Image (Both UEFI and BIOS) to "repair" the module with just one push of a button. Maybe you find it useful.

https://github.com/NikolaiRadke/JQ6500-rescue-tool

Best wishes from Berlin,

Nikolai

Repeated playing problem

I have two sound affects which play one after the other using an momentary push button (not in constant loop) , after playing 14 times the module stops playing, the on board light illuminates, but no sound? After disconnecting and reconnecting the power source it works fine until it plays for another 14 times. I'm using the play by number file code.
Any help to how I can fix this problem would be appreciated.

Question - How to change JQ6500 device baud rate permanently?

Greetings Sleemanj,

This is more a question than an issue, sorry if there is another way to communicate between GitHub users...

Do you know the way to permanently change the JQ6500 MP3 player module baud rate?

I am in the need to interface it with a very ancient system, its maximum UART operation can reach 4800 bps instead the JQ6500 default.

I am aware of the man in the middle solution, use a microcontroller, but this solution appears to be a waste of resources for only a serial port input, followed by a slower serial port output.

Thanks in advance!

Not really an issue, question: compatibility with NodeMCU 1.0 / ESP8266

Hi, i tried to make a NodeMCU 1.0 work with this JQ6500 library but it somehow the example sketch will not compile due to a missing .a file (which is a in compilation created file as far as i found out). The error is: "xtensa-lx106-elf-gcc: error: libraries\JQ6500_Serial-master\JQ6500_Serial-master.a: No such file or directory" but the library is included and the folder can be found

So my question: Is the library compatible to the ESP8266 chip at all?
It is compiling without the error for Arduino boards and i did so in the past successfully,

Baudrate

Hello, thank you for your repo.
Can you help me about baud rate of JQ6500. I've tried default 9600 baud rate, it works great. But when i tried higher baud rate: 38400, 115200,... It didn't work. So can it really can works with higher baud rate than 9600? Or i have to set its baud rate somewhere else first?
Thank you very much.

missing tool to erase memory of jq6500 16P

I m looking for a tool to completely erase the internal memory as it seems that the uploaded files have been scrambled. When I start a "play file by number" just scrambled snippets from the original mp3 files are randomly played.
Is there a buffer- or memory overflow of some kind or what may be the cause?

ESP32 JQ6500_Serial begin

When compiling for ESP32, I get following error:
no matching function for call to 'JQ6500_Serial::begin(int, int, int)

Wont compile on esp8266

The library gives errors on an esp8266.
Does the library use specific arduino hardware functions ?

getStatus() always returns STOPPED

I'm using the FullDemo example with an Arduino Uno talking to the JQ6500 via a 3/5V level converter.
Whenever i give the help (?) command the status of the JQ6500 is read and reported on the serial console. But even while playing it says "stopped".
The JQ6500 module I'm using has no microSD card, just internal memory containing a single MP3

Weird behavior of volume setting JQ6500

Hi,

I am using a JQ6500 for a Word Clock to play some chimes. Therefore, I use SoftwareSerial and the JQ6500-library. Most of the time the volume setting does no work properly. However, play commands work as designed. My sketch uses a DS3231 via I2C, DCF77 signal decoding on interrupt pin 2 and the Fastled library.

When I use a reduced sketch like your full demo or still further reduced to only play commands and volume setting, the volume is set as supposed.

Any idea, what is causing these conflicts? Timer, interrupt etc.? Why is the play command working, however volume setting is faulty?

Thanks
Martin

More a query than an issue

Hi,

Has anyone ever built a custom JQ6500 into a custom board? I have looked on EasyEDA but can't find anything.

Thnanks

RandonPlay example Issue random and Sound repeating , possible Fix

Hi James,

I noticed the RandonPlay example uses "pseudo random"
You end up with a mathematical pattern, so every reset you get the same set of numbers generated.

adding randomseed makes for a better output (not sure how this would work on the ESP)

randomSeed(analogRead(A0)); // mitigate "pseudo random" by sampling the noise on analogue pin0 and use it as a value.

 pick = random(1, numFiles + 1);
} while (pick == mp3.currentFileIndexNumber(mediaType));

`

Also "mp3.playFileByIndexNumber(pick);" followed by "mp3.play();" often causes the file to repeat immediate.
As soon as I removed "mp3.play();" the issue was resolved.

Thanks for your hard work

Rupert

soundfile format

Hello,
Sorry if this is not the right place to relate.
I get something good uploading one single 10sec. mp3 soundfile with a 45-85Kbps compression.
However, if I upload more than one file the sound is saturated for each.
This is not a power issue.
What file encoding do someone uses ?
Is there something special to know with file upload.

error: expected ')' before '*' token JQ6500_Serial(Stream *dev) : _serial(dev) {}

Hi

I just installed Arduino on a newly set up Windows machine and wanted to test a little circuit using your Hello World example, but even after streamlining the example I end up with an error dump. Any idea what's causing this?
The Arduino IDE (1.8.19) highlights the "JQ6500_Serial mp3(mySerial);" line.

#include <JQ6500_Serial.h>
 
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <JQ6500_Serial.h>

//   Arduino Pin 8 is connected to TX of the JQ6500
//   Arduino Pin 9 is connected to one end of a  1k resistor, 
//     the other end of the 1k resistor is connected to RX of the JQ6500

SoftwareSerial mySerial(8, 9);
JQ6500_Serial mp3(mySerial);

void setup() {  
  mySerial.begin(9600);
  mp3.reset();
  mp3.setVolume(20); // 1-30
  //mp3.setLoopMode(MP3_LOOP_ALL);
  mp3.setLoopMode(MP3_LOOP_ONE);
  mp3.play();  
}

void loop() {
}
In file included from D:\workspace\arduino_entb_tricorder\arduino_entb_tricorder.ino:1:0:
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:111:26: error: expected ')' before '*' token
     JQ6500_Serial(Stream *dev) : _serial(dev) {}
                          ^
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:112:26: error: expected ')' before '&' token
     JQ6500_Serial(Stream &dev) : _serial(&dev) {}
                          ^
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:195:20: error: 'byte' has not been declared
     void setVolume(byte volumeFrom0To30);
                    ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:210:23: error: 'byte' has not been declared
     void setEqualizer(byte equalizerMode); // EQ_NORMAL to EQ_BASS
                       ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:223:22: error: 'byte' has not been declared
     void setLoopMode(byte loopMode);
                      ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:233:20: error: 'byte' has not been declared
     void setSource(byte source);        // SRC_BUILTIN or SRC_SDCARD
                    ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:273:5: error: 'byte' does not name a type; did you mean 'bit'?
     byte getStatus();
     ^~~~
     bit
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:280:5: error: 'byte' does not name a type; did you mean 'bit'?
     byte getVolume();
     ^~~~
     bit
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:294:5: error: 'byte' does not name a type; did you mean 'bit'?
     byte getEqualizer();
     ^~~~
     bit
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:307:5: error: 'byte' does not name a type; did you mean 'bit'?
     byte getLoopMode();
     ^~~~
     bit
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:316:29: error: 'byte' has not been declared
     unsigned int countFiles(byte source);
                             ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:326:31: error: 'byte' has not been declared
     unsigned int countFolders(byte source);
                               ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:337:41: error: 'byte' has not been declared
     unsigned int currentFileIndexNumber(byte source);
                                         ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:381:22: error: 'byte' has not been declared
     void sendCommand(byte command, byte arg1, byte arg2, char *responseBuffer, unsigned int bufferLength);
                      ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:381:36: error: 'byte' has not been declared
     void sendCommand(byte command, byte arg1, byte arg2, char *responseBuffer, unsigned int bufferLength);
                                    ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:381:47: error: 'byte' has not been declared
     void sendCommand(byte command, byte arg1, byte arg2, char *responseBuffer, unsigned int bufferLength);
                                               ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:384:22: error: 'byte' has not been declared
     void sendCommand(byte command);
                      ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:385:22: error: 'byte' has not been declared
     void sendCommand(byte command, byte arg1);
                      ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:385:36: error: 'byte' has not been declared
     void sendCommand(byte command, byte arg1);
                                    ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:386:22: error: 'byte' has not been declared
     void sendCommand(byte command, byte arg1, byte arg2);
                      ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:386:36: error: 'byte' has not been declared
     void sendCommand(byte command, byte arg1, byte arg2);
                                    ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:386:47: error: 'byte' has not been declared
     void sendCommand(byte command, byte arg1, byte arg2);
                                               ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:397:53: error: 'byte' has not been declared
     unsigned int sendCommandWithUnsignedIntResponse(byte command);
                                                     ^~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:404:5: error: 'Stream' does not name a type; did you mean 'Stream_h'?
     Stream *_serial;
     ^~~~~~
     Stream_h
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:406:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_BEGIN = 0x7E;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:407:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_END   = 0xEF;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:409:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_PLAY = 0x0D;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:410:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_PAUSE = 0x0E;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:411:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_NEXT = 0x01;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:412:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_PREV = 0x02;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:413:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_PLAY_IDX = 0x03;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:415:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_NEXT_FOLDER = 0x0F;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:416:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_PREV_FOLDER = 0x0F; // Note the same as next, the data byte indicates direction
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:418:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_PLAY_FILE_FOLDER = 0x12;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:420:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_VOL_UP = 0x04;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:421:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_VOL_DN = 0x05;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:422:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_VOL_SET = 0x06;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:424:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_EQ_SET = 0x07;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:425:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_LOOP_SET = 0x11;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:426:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_SOURCE_SET = 0x09;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:427:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_SLEEP = 0x0A;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:428:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_RESET = 0x0C;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:430:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_STATUS = 0x42;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:431:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_VOL_GET = 0x43;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:432:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_EQ_GET = 0x44;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:433:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_LOOP_GET = 0x45;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:434:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_VER_GET = 0x46;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:436:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_COUNT_SD  = 0x47;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:437:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_COUNT_MEM = 0x49;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:438:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_COUNT_FOLDERS = 0x53;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:439:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_CURRENT_FILE_IDX_SD = 0x4B;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:440:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_CURRENT_FILE_IDX_MEM = 0x4D;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:442:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_CURRENT_FILE_POS_SEC = 0x50;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:443:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_CURRENT_FILE_LEN_SEC = 0x51;
                  ^~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:444:18: error: 'uint8_t' does not name a type
     static const uint8_t MP3_CMD_CURRENT_FILE_NAME = 0x52;
                  ^~~~~~~
arduino_entb_tricorder:12:27: error: no matching function for call to 'JQ6500_Serial::JQ6500_Serial(SoftwareSerial&)'
 JQ6500_Serial mp3(mySerial);
                           ^
In file included from D:\workspace\arduino_entb_tricorder\arduino_entb_tricorder.ino:1:0:
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:79:7: note: candidate: constexpr JQ6500_Serial::JQ6500_Serial()
 class JQ6500_Serial
       ^~~~~~~~~~~~~
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:79:7: note:   candidate expects 0 arguments, 1 provided
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:79:7: note: candidate: constexpr JQ6500_Serial::JQ6500_Serial(const JQ6500_Serial&)
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:79:7: note:   no known conversion for argument 1 from 'SoftwareSerial' to 'const JQ6500_Serial&'
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:79:7: note: candidate: constexpr JQ6500_Serial::JQ6500_Serial(JQ6500_Serial&&)
D:\Users\michael\Documents\Arduino\libraries\JQ6500_Serial\src/JQ6500_Serial.h:79:7: note:   no known conversion for argument 1 from 'SoftwareSerial' to 'JQ6500_Serial&&'
exit status 1
no matching function for call to 'JQ6500_Serial::JQ6500_Serial(SoftwareSerial&)'

Random play issue

Hi Sleeman. Must thank you a lot for the JQ6500 info. it worked great after my horrible experience with shitty WTV020 and shittier WT588D...
regarding the Random play code you gave, worked great, but can you please tell me which line in the code adjusts the time gap between playing each file ?

Change baud rate

Hello,
Is it possible to use the jq6500 with another speed than 9600?

Looping the single audio

Hello,
I am very new to this, and I have a very basic question.

Is there any way to play a single audio in loop in JQ6500 audio module without Ardrino.
If yes let me know the way.

If no, please let know If I apply single audio looping with Ardrino and upload the the code, can the JQ6500 work wine with looping stand alone or without Ardrino?

audio clic at 2000 ms

Hello,
Sorry to come here again.
I'm using a mqtt broker to trig the JQ's via an ESP01 (ESP8266 mc)
Everythin'g is now fine except I get an horrible audio crack from the JQ for any sound around 2000 ms after the play command is sent to.
I can't understand if the problem is from my code, or from the mqtt broker, since the blue light on the microcontroller lights up two times : first it trigs the sound, then it lights again around 2000 ms and the audio artefact occurs.
I've opened an issue here on knolleary's pubsubclient repos [https://github.com/knolleary/pubsubclient/issues/671]

Here some relevant part of my JQ sketch

`//in setup

mp3.begin(9600, 0, 2);
mp3.reset();
//mp3.setvolume(volume);
mp3.setEqualizer(MP3_EQ_NORMAL);

mp3.setLoopMode(MP3_LOOP_ONE_STOP); // Default, plays track and stops
mp3.pause(); // en pause au démarrage

// we select the built in source NOT SD card source
mp3.setSource(MP3_SRC_BUILTIN);
numFiles = mp3.countFiles(MP3_SRC_BUILTIN);// nombre de sons stockés dans le JQ
mediaType = MP3_SRC_BUILTIN;// pas de carte SD

//in loop
//-------------- play JQ6500 audiofile ----------------
if (global_enabled) {
mp3.setVolume(volume);
// ** NOTE: Checking for STOPPED doesn't work with the builtin memory
// because in that case the devie appears to only return PAUSED, not STOPPED
byte stat = mp3.getStatus();
if(stat != MP3_STATUS_PLAYING)
{//soundfile index
mp3.playFileByIndexNumber(soundfile);
//play it !
mp3.play();
}
}
global_enabled = false;
}`

Allow the use of different Serial/Software serial libraries via Stream object

Hi!

I was using your library for a project based on esp32 chip and I was tempted to use one of the available hardware ports.
I slightly modified the library (see my fork) to be able to use a generic Stream object. In this way, users can decide which Serial/library to use.

What do you think about it? I faced some problems in the past using SoftwareSerial (conflicts with Servo library...).
Thanks

Questions about decoding debug codes

JQ6500 debug tool is really interesting.

However I can't understand why I get some of those information in the monitor.
They are not in my code.
So I wonder if they take place in a chronological order ? Or how they occur
Because indeed, something here causes an audio clic in the speaker.

My loop() is really simple: (relevant code)
if (global_enabled) { mp3.setVolume(volume); byte stat = mp3.getStatus(); if(stat != MP3_STATUS_PLAYING) { mp3.playFileByIndexNumber(soundfile); mp3.play(); } } global_enabled = false; }

But I get lot of information when that code is called :
7E 3 6 19 EF ==> []
7E 2 42 EF ==> []
7E 4 3 0 1 EF ==> []
7E 2 d EF ==> []

line 1
3 = MP3_CMD_PLAY_IDX .... plays index ?? code that do taht comes later for me
6 = MP3_CMD_VOL_SET .... setVolume() OK
19 = ......  What is this, ..... not listed ? ??

line 2
2 = MP3_CMD_PREV ..... Why previous track ??
42 = MP3_CMD_STATUS ...... mp3.getStatus() OK

line 3
4 = MP3_CMD_VOL_UP ... why ?
3 = MP3_CMD_PLAY_IDX mp3.playFileByIndexNumber() OK
0 = ......  What is this, ..... not listed ? ??
1 = MP3_CMD_NEXT ??

line 4
2 = MP3_CMD_PREV ..... Why previous track again ??
d = MP3_CMD_PLAY mp3.play() OK

Which of these boards is newer?

I got the jq6500-16p ver2.1 from two different stores. But one of them does not work in adkey function. Which of these boards is newer and why is one of them not working?
It's like they have different chip despite the same version! The method of printing jq6500-16p V2.1 text on the boards is also different. Pay attention to the pictures
The second one works with two AA batteries and adkey, but the first board does not work and shuts down(JQ6500-24SS chip)
Screenshot_2024-06-14-21-37-47-206_ir eitaa messenger-edit
Screenshot_2024-06-14-21-37-26-909_ir eitaa messenger-edit

JQ6500 stalling program

I've been using this library with the JQ6500-16p v2.1 (module with microUSB).
I'm finding that when I use the "playFileByIndexNumber" command, my arduino has to wait for the mp3 to finish playing before it continues with it's program.
I've tested this by running timers on my sketch, as well as the included jq6500 examples.
Is this just how the library is meant to work, or is it a bug?
If it is working as intended, is there a way to turn this off?

move to HW serial

I use Timer1 interrupt in my software, and there is a conflict with SoftwareSerial.h because it use interrupt too.

Could you add the choice of use hardware serial ?
Where is the JQ6500 datasheet ?
thx

JQ6500 -16p Set default volume

Hello, how can I set jq6500-16p in standalone mode so that its volume is the highest level by default (even after power cut) (volume 30)?

Loop modes behavior

This is probably an issue in my code but just to be sure ...

I'm not able to get the MP3_LOOP_ONE working ( same track repeating).
I can monitor that the swicth case occurs but the play command is executed only once.

Question : Is it possible to change the loop mode at run time or is there something special to do to swicth between modes 11 4 and 11 2 ?

if (global_enabled) {//avoid playing at startup, only if mqtt publication

      switch(holdit)
      {
      //MP3_LOOP_ONE_STOP: ONE_STOP does not loop, plays the track and stops
      //7E 3 11 4  EF
      case 0 : mp3.setLoopMode(MP3_LOOP_ONE_STOP); break; 
     
      
      //MP3_LOOP_ONE : ONE plays the same track repeating
      //7E 3 11 2  EF
      case 1 :  mp3.setLoopMode(MP3_LOOP_ONE); 
      }
  mp3.setVolume(volume);
  byte stat = mp3.getStatus();
 
  if(stat != MP3_STATUS_PLAYING) 
  {
    mp3.playFileByIndexNumber(soundfile);
    }
  }
global_enabled = false;

Add support for DFRobot-Mini / MP3-TF-16P

The DFRobot Mini / MP3-TF-16P protocol is similar, it has an additional version byte and two checksum bytes, and also adds some response data, it may be easy enough to extend JQ6500_Serial to handle this player also

#8 (comment)

JQ6500_Error

When I compile code on Arduino Nano I get following error:
no matching function for call to JQ6500_Serial::JQ6500_Serial(int, int)

Please help me to solve this error!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.