File tree Expand file tree Collapse file tree 5 files changed +10
-91
lines changed
Expand file tree Collapse file tree 5 files changed +10
-91
lines changed Original file line number Diff line number Diff line change 33 https://github.com/baldram/ESP_VS1053_Library
44 If you like this project, please add a star.
55
6- Copyright (C) 2017 Marcin Szalomski (github.com/baldram)
6+ Copyright (C) 2018 Marcin Szalomski (github.com/baldram)
77 Licensed under GNU GPL v3
88
99 The circuit (example wiring for ESP8266 based board like eg. LoLin NodeMCU V3):
4141#include < VS1053.h>
4242
4343// Please find helloMp3.h file here:
44- // github.com/baldram/ESP_VS1053_Library/blob/master/examples/SimpleMp3Player /helloMp3.h
44+ // github.com/baldram/ESP_VS1053_Library/blob/master/examples/Mp3PlayerDemo /helloMp3.h
4545#include " helloMp3.h"
4646
4747// Wiring of VS1053 board (SPI connected in a standard way)
5454VS1053 player (VS1053_CS, VS1053_DCS, VS1053_DREQ);
5555
5656void setup () {
57+ Serial.begin (115200 );
58+
5759 // initialize SPI
5860 SPI.begin ();
5961
62+ Serial.println (" Hello VS1053!\n " );
6063 // initialize a player
6164 player.begin ();
6265 player.switchToMp3Mode (); // optional, some boards require this
6366 player.setVolume (VOLUME);
6467}
6568
6669void loop () {
70+ Serial.println (" Playing sound... " );
71+
6772 // play mp3 flow each 3s
6873 player.playChunk (helloMp3, sizeof (helloMp3));
6974 delay (3000 );
Original file line number Diff line number Diff line change 33 * https://github.com/baldram/ESP_VS1053_Library
44 * If you like this project, please add a star.
55 *
6- * Copyright (C) 2017 Marcin Szalomski
6+ * Copyright (C) 2018 Marcin Szalomski
77 * Licensed under GNU GPL v3
88 */
99unsigned char helloMp3 [] = {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,6 +17,3 @@ framework = arduino
1717platform = espressif32
1818framework = espidf
1919board = esp32dev
20-
21- lib_deps =
22- ArduinoLog
Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ void VS1053::stopSong() {
243243}
244244
245245void VS1053::softReset () {
246+ LOG (" Performing soft-reset\n " );
246247 write_register (SCI_MODE, _BV (SM_SDINEW) | _BV (SM_RESET));
247248 delay (10 );
248249 await_data_request ();
@@ -276,5 +277,6 @@ void VS1053::switchToMp3Mode() {
276277 wram_write (0xC017 , 3 ); // GPIO DDR = 3
277278 wram_write (0xC019 , 0 ); // GPIO ODATA = 0
278279 delay (100 );
280+ LOG (" Switched to mp3 mode\n " );
279281 softReset ();
280282}
You can’t perform that action at this time.
0 commit comments