Skip to content

Commit 5e21f25

Browse files
authored
Update README.md
1 parent ce74318 commit 5e21f25

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1-
# adafruit-vs1053-modified
2-
Adafruit VS1053 Library with added methods for utilising the spectrum analyser plugin
1+
## Modified Adafruit VS1053 for Music Maker Shield
2+
3+
Adafruit VS1053 Library with added methods for utilising the spectrum analyser plugin.
4+
Uses the spectrum analyser plugin from the VSLI website (http://www.vlsi.fi/en/support/software/vs10xxplugins.html).
5+
6+
In theory it should be compatible with other arduino shields which use the VS1053 chip.
7+
8+
### Added methods
9+
10+
* ```readFrequencies(uint16_t *currentVal, uint16_t *peak)``` reads the results and fills two arrays with the current and peak values of an mp3 that is being played by the shield (values are from 0 to 31 in 3dB steps).
11+
* ```checkRateAndBands(void)``` prints out the sampling rate and the number of frequency bands being read.
12+
* ```setFrequencies(int numOfBands, short *frequency)``` sets the frequencies to be read.
13+
* ```readBands(void)``` returns the frequency bands.
14+
* ```readSamplingRate(void)``` returns the sampling rate.
15+
16+
### How to setup your project to use the added functionality
17+
18+
1. Download the spectrum analyser plugin from the VSLI website (http://www.vlsi.fi/en/support/software/vs10xxplugins.html)
19+
2. Open "spectrumAnalyzer1053b.plg" in a text editor
20+
3. Copy from #ifndef SKIP_PLUGIN_VARNAME (line 27) to #endif (line 152) to the top of your arduino project sketch
21+
4. Make sure you have included the modified library in your sketch
22+
5. After you initialise the mp3 player shield in your sketch add the following code: varNameOfFilePlayer.applyPatch(plugin, PLUGIN_SIZE);
23+
6. Use methods as required (refer to example code for reference)

0 commit comments

Comments
 (0)