
- #MP3 PLAYER ARDUINO HOW TO#
- #MP3 PLAYER ARDUINO SERIAL#
Int buttonState = digitalRead(buttonPin) Then set the pin numbers for the VS1053 control: Start by adding the SPI, SD, and Adafruit MP3 control libraries for this module.
This library also works with the Sparkfun shield. You’ll need to add the Adafruit_VS1053 library using the Library Manager in the Arduino IDE. You can control the VS1053 from your Arduino with the button playback example.
The center is connected to the MKR’s analog in 0 (physical pin 2). The potentioneter’s two sides are connected to the 3.3V voltage bus and ground, respectively. The other side is connected to the MKR’s pin D1 (physical pin 10). One side of the pushbutton is connected to the ground bus.
VS1053 GNC (physical pin 24) - connected to ground bus. VS1053 VCC (physical pin 26) - connected to 3.3V voltage bus. VS1053 Analog Ground (AGND) (physical pin 30) - connected to stereo mini jack center pin. VS1053 Left Audio Out (LOUT) (physical pin 31) - connected to stereo mini jack left pin. VS1053 Right Audio Out (ROUT)(physical pin 32) - connected to stereo mini jack right pin. VS1053 Data request (DREQ)(physical pin 27) - connected to MKR pin D5 (physical pin 14). VS1053 SD card chip select pin (SDCS) (physical pin 17) - connected to MKR pin D3 (physical pin 12). VS1053 Data/command select pin (XDCS) (physical pin 16) - connected to MKR pin D4 (physical pin 13). VS1053 SPI chip select pin (CS) (physical pin 18) - connected to MKR pin D7 (physical pin 16). VS1053 SPI clock (physical pin 21) - connected to MKR pin D9 (physical pin 18). VS1053 SPI MISO (physical pin 23) - connected to MKR pin D10 (physical pin 19). VS1053 SPI MOSI (physical pin 22) - connected to MKR pin D8 (physical pin 17). VS1053 Reset pin (RESET) (physical pin 20) - connected to MKR pin D6 (physical pin 15). The wiring connections for the MKR board connected to the VS1053 module are as follows: MKR board connected to an Adafruit VS1053 module in MP3 mode The board wiring connections are described below the image.įigure 1. A stereo mini jack, a potentiometer, and a pushbutton are mounted in between. The MKR Zero is mounted the top of the breadboard as usual, and the VS1053 is mounted at the bottom. Analog Ground (AGND) - built into the stereo mini jackįigure 1 shows the Adafruit VS1053 breakout module connected to a MKR Zero. Left Audio Out (LOUT) - built into the stereo mini jack. Right Audio Out (ROUT) - built into the stereo mini jack. Data request (DREQ)- Arduino Uno pin D2. SD card chip select pin (SDCS) - Arduino Uno pin D9. Data/command select pin (DCS) - Arduino Uno pin D7. SPI chip select pin (CS) - Arduino Uno pin D6. Its pinout follows the Arduino UNo footprint, and here are the relevant pins: The Sparkfun MP3 Player shield is designed to be used with the Uno style boards. It’s designed to be used with Adafruit’s Feather boards. The Adafruit VS1053 Featherwing has a slightly different layout. Left Audio Out (LOUT) - physical pin 31. Right Audio Out (ROUT) - physical pin 32. SD card chip select pin (SDCS) - physical pin 17. Data/command select pin (XDCS) - physical pin 16. SPI chip select pin (CS) - physical pin 18. The SD card is at the bottom of the module: The Adafruit VS1053 breakout module’s pins are numbered in a U shape from top left to top right. #MP3 PLAYER ARDUINO SERIAL#
MP3 mode is controlled via an SPI synchronous serial interface, as is the SD card. The relevant pins for using it as an MP3 player are described below, both for the Adafruit breakout module and the Sparkfun shield. Both Sparkfun and Adafruit make products with this useful component. The VS1053 module is a handy MIDI synth, and it can also play MP3 files from its SD card. This project is maintained by tigoe The VS1053 Module as an MP3 player This version doesn't care about the distance, only detects differences between readings.A collection of Sound, MIDI, and I2S examples for Arduino
#MP3 PLAYER ARDUINO HOW TO#
How to use both Version 2 and Disturbance mp3 distance trigger