Skip to content

Commit 05b7e8c

Browse files
Revise README (#116)
1 parent c256b32 commit 05b7e8c

1 file changed

Lines changed: 26 additions & 27 deletions

File tree

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,28 @@ Very lightweight, has a binary footprint of less than 7kB excluding the psram bu
1919
~~Install [ESP_VS1053_Library](https://github.com/baldram/ESP_VS1053_Library) and this library in your Arduino library folder.~~
2020

2121
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.
2423

2524
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.
2625

2726
### platformio.ini example
2827

29-
```bash
28+
```ini
3029
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip
3130

3231
lib_deps =
3332
https://github.com/CelliesProjects/ESP_VS1053_Library#make-SCI-registers-readable
34-
https://github.com/CelliesProjects/ESP32_VS1053_Stream@3.0.4
33+
https://github.com/CelliesProjects/ESP32_VS1053_Stream@3.0.6
3534
```
3635

37-
### Arduino IDE setup for 3.0.0 or later releases
36+
### Arduino IDE setup
3837

39-
- 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`.
4039
- In the Arduino IDE go to `Sketch->Include Library->Add .ZIP library` and select the downloaded zip file to install.
4140
- Answer `YES` when asked to overwrite the existing library.
4241

4342
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.
4544

4645
## Example: play a stream
4746
```c++
@@ -256,8 +255,8 @@ void loop() {
256255

257256
### WiFi setup
258257

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.
261260

262261
```c++
263262
...
@@ -301,24 +300,24 @@ You can now see the hardware revision when you upload a sketch.
301300
### Initialize the VS1053 codec
302301

303302
```c++
304-
bool startDecoder(CS, DCS, DREQ)
303+
bool startDecoder(CS, DCS, DREQ);
305304
```
306305
### Check if VS1053 is responding
307306
```c++
308-
bool isChipConnected()
307+
bool isChipConnected();
309308
```
310309
### Start or resume a stream
311310
```c++
312-
bool connectToHost(url)
311+
bool connectToHost(url);
313312
```
314313
```c++
315-
bool connectToHost(url, offset)
314+
bool connectToHost(url, offset);
316315
```
317316
```c++
318-
bool connectToHost(url, user, pwd)
317+
bool connectToHost(url, user, pwd);
319318
```
320319
```c++
321-
bool connectToHost(url, user, pwd, offset)
320+
bool connectToHost(url, user, pwd, offset);
322321
```
323322
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.
324323
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:
328327
```
329328
### Start or resume a local file
330329
```c++
331-
bool connectToFile(filesystem, filename)
330+
bool connectToFile(filesystem, filename);
332331
```
333332
```c++
334-
bool connectToFile(filesystem, filename, offset)
333+
bool connectToFile(filesystem, filename, offset);
335334
```
336335
`filesystem` has to be mounted.
337336
### Stop a running stream
338337
```c++
339-
void stopSong()
338+
void stopSong();
340339
```
341340
### Feed the decoder
342341
```c++
343-
void loop()
342+
void loop();
344343
```
345344
This function has to called every couple of ms to feed the decoder with data.
346345
For bitrates up to 320kbps somewhere between 5-10 ms is about right.
347346
### Check if stream is running
348347
```c++
349-
bool isRunning()
348+
bool isRunning();
350349
```
351350
### Get the current volume
352351
```c++
353-
uint8_t getVolume()
352+
uint8_t getVolume();
354353
```
355354
### Set the volume
356355
```c++
357-
void setVolume(newVolume)
356+
void setVolume(newVolume);
358357
```
359358
`newVolume` should be in the range 0-100.
360359
### Set bass and treble
361360
```c++
362361
uint8_t rtone[4] = {toneha, tonehf, tonela, tonelf};
363-
void setTone(rtone)
362+
void setTone(rtone);
364363
```
365364
Values for `rtone`:
366365
```c++
@@ -371,22 +370,22 @@ tonelf = <0..15> // Setting bass frequency lower limit x 10 Hz
371370
```
372371
### Get the current stream url
373372
```c++
374-
const char* lastUrl()
373+
const char* lastUrl();
375374
```
376375
The current stream url might differ from the request url if the request url points to a playlist.
377376
### Get the filesize
378377
```c++
379-
size_t size()
378+
size_t size();
380379
```
381380
Returns `0` if the stream is a radio stream.
382381
### Get the current position in the file
383382
```c++
384-
size_t position()
383+
size_t position();
385384
```
386385
Returns `0` if the stream is a radio stream.
387386
### Get the buffer fill status
388387
```c++
389-
void bufferStatus(size_t &used, size_t &capacity)
388+
void bufferStatus(size_t &used, size_t &capacity);
390389
```
391390
392391
Note: A buffer will only be allocated if there is enough free psram.

0 commit comments

Comments
 (0)