The VS1053 has 8 GPIO pins that can be read and written via the library. The player_gpiotest sketch demonstrates how to do this.

Start with the basic wiring

Use the Simple Audio Player Wiring from the link on the left.

Add some LEDs

Add a jumper from the ground bus on the left to the ground bus on the right of the breadboard.

Then add some LEDs from the GPIO pins to ground. Be sure to connect the long lead (anode) to the GPOI pin and the short lead (cathode) to ground.

What? No current limiting resistors?

Strictly speaking, best practice is to use a current limiting resistor when driving an LED from a GPIO pin. In this case, the example sketch pulses each led only briefly, so there is no danger of damage. For more general use, you should select a resistor appropriate for the led you are using. See All About LEDs for more detail.

Run the player_gpiotest sketch

Connect the Arduino to your computer with a USB cable. Select File->Examples->Adafruit_VS1053->player_gpiotest to load the example code.

If you have headphones, you will hear a beep at the start to indicate that the sketch is running. Then you should see the LEDs flashed in sequence.

If you open the Serial Monitor, you can see the values that are written to and read from each GPIO pin.

Note that the GPIO pins are NOT 5v safe. Do not connect them to voltages greater than 3.3v.
This guide was first published on Jul 30, 2013. It was last updated on Jul 30, 2013. This page (GPIO) was last updated on May 04, 2015.