I borrowed a test program for VS1003 on arduino from
I think I have modified it correctly but the VS1053 still outputs nothing.
There is a printf in the code that I don't understand it's function.
Have I broken the code or do I have bad hardware?
/*
vs1053_hello
A simple MP3 flow player to test if board and library are working together.
The following sketch should say "Hello" every 0.5s :)
Created 2012-04-05 by Andrey Karpov
2021-02-11 modifying for esp32
included VS1053 library in arduino.ide
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
//#include <avr/io.h> //not found but then I am using an esp32 which is not an AVR microprocessor
//#include <Arduino.h>
#include "printf.h"
#include <VS1053.h> // added VS1053 library
#include <SPI.h>
#define VS1053_CS 32
#define VS1053_DCS 33
#define VS1053_DREQ 35
VS1053 player(VS1053_CS, VS1053_DCS, VS1053_DREQ);
unsigned char HelloMP3[] = {
// here is hex codes for an mp3 saying hello
// get it from the link above (it's too big)
}
void setup () {
// initiate SPI
SPI.begin();
// initiate a serial port at 57600
Serial.begin(57600);
// internal routines ??? what does this do?
//cjp printf_begin();
//cjp printf_P(PSTR(__FILE__ "\r\n"));
// initiate a player
player.begin();
// set maximum output volume
player.setVolume(95);
}
void loop() {
// play hellomp3 flow each 0.5s ;)
player.playChunk(HelloMP3, sizeof(HelloMP3));
delay(500);
}
Hardware is connected as
Power +5
Ground
Mosi - D23
Miso - D19
SCK - D18
CS - D32
DCS - D33
DREQ D35
RST EN