You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-27Lines changed: 26 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,29 +19,28 @@ Very lightweight, has a binary footprint of less than 7kB excluding the psram bu
19
19
~~Install [ESP_VS1053_Library](https://github.com/baldram/ESP_VS1053_Library) and this library in your Arduino library folder.~~
20
20
21
21
Release 3.0.0 and later require read access to the vs1053 registers which the [ESP_VS1053_Library](https://github.com/baldram/ESP_VS1053_Library) does not provide.
22
-
There is a [PR](https://github.com/baldram/ESP_VS1053_Library/pull/119) fixing this issue waiting to be merged in the ESP_VS1053_Library repo.
23
-
While that is waiting you can use [this fork](https://github.com/CelliesProjects/ESP_VS1053_Library/tree/make-SCI-registers-readable) to compile the 3.0.0 and later releases.
22
+
While that is getting fixed you can use [this fork](https://github.com/CelliesProjects/ESP_VS1053_Library/tree/make-SCI-registers-readable) to compile the 3.0.0 and later releases.
24
23
25
24
Use the [latest Arduino ESP32 core version](https://github.com/espressif/arduino-esp32/releases/latest) for Arduino IDE or the corresponding [PIOArduino release](https://github.com/pioarduino/platform-espressif32/releases/latest) if you use PlatformIO in VSCode.
- Browse to [the forked repository](https://github.com/CelliesProjects/ESP_VS1053_Library/tree/make-SCI-registers-readable) and download the zip file found under the green button marked `<> Code`.
38
+
- Browse to [the patched vs1053 repository](https://github.com/CelliesProjects/ESP_VS1053_Library/tree/make-SCI-registers-readable) and download the zip file found under the green button marked `<> Code`.
40
39
- In the Arduino IDE go to `Sketch->Include Library->Add .ZIP library` and select the downloaded zip file to install.
41
40
- Answer `YES` when asked to overwrite the existing library.
42
41
43
42
That's it.
44
-
With the forked vs1053 library installed 3.0.x releases can be compiled in the Arduino IDE.
43
+
With the patched vs1053 library installed 3.x.x releases can be compiled in the Arduino IDE.
45
44
46
45
## Example: play a stream
47
46
```c++
@@ -256,8 +255,8 @@ void loop() {
256
255
257
256
### WiFi setup
258
257
259
-
Switch off the BlueTooth radio if unused.
260
-
Do not forget to switch WiFi out of power save mode.
258
+
-Switch off the BlueTooth radio if unused.
259
+
- Switch off power save mode.
261
260
262
261
```c++
263
262
...
@@ -301,24 +300,24 @@ You can now see the hardware revision when you upload a sketch.
301
300
### Initialize the VS1053 codec
302
301
303
302
```c++
304
-
boolstartDecoder(CS, DCS, DREQ)
303
+
boolstartDecoder(CS, DCS, DREQ);
305
304
```
306
305
### Check if VS1053 is responding
307
306
```c++
308
-
bool isChipConnected()
307
+
bool isChipConnected();
309
308
```
310
309
### Start or resume a stream
311
310
```c++
312
-
boolconnectToHost(url)
311
+
boolconnectToHost(url);
313
312
```
314
313
```c++
315
-
bool connectToHost(url, offset)
314
+
bool connectToHost(url, offset);
316
315
```
317
316
```c++
318
-
boolconnectToHost(url, user, pwd)
317
+
boolconnectToHost(url, user, pwd);
319
318
```
320
319
```c++
321
-
bool connectToHost(url, user, pwd, offset)
320
+
bool connectToHost(url, user, pwd, offset);
322
321
```
323
322
Note: When a stream does not start in this library but it does play on your desktop or laptop you can try increasing the connection timeout.
324
323
You can do this in `ESP32_VS1053_Stream.h` by increasing these values:
@@ -328,39 +327,39 @@ You can do this in `ESP32_VS1053_Stream.h` by increasing these values:
328
327
```
329
328
### Start or resume a local file
330
329
```c++
331
-
bool connectToFile(filesystem, filename)
330
+
bool connectToFile(filesystem, filename);
332
331
```
333
332
```c++
334
-
boolconnectToFile(filesystem, filename, offset)
333
+
boolconnectToFile(filesystem, filename, offset);
335
334
```
336
335
`filesystem` has to be mounted.
337
336
### Stop a running stream
338
337
```c++
339
-
void stopSong()
338
+
void stopSong();
340
339
```
341
340
### Feed the decoder
342
341
```c++
343
-
voidloop()
342
+
voidloop();
344
343
```
345
344
This function has to called every couple of ms to feed the decoder with data.
346
345
For bitrates up to 320kbps somewhere between 5-10 ms is about right.
0 commit comments