Introduction: Raspberry Pi DJ Audio Player
Somewhere in my past I was a DJ, playing music at parties/bars. During this time I always dreamed of making my own audio player. Well today is the day and I just went for it and tried to make one.
The first question I asked myself was: "What are the most basic controls needed for a DJ to have?". For the answer I looked at the old technics turntables. They have 2 controls: play/stop and increase/decrease the playback speed. This was my goal for this project. To have an audio player on the raspberry that is able to play/stop and speed up/down a song.
This instructable will guide you how to make this basic audio player.
Step 1: Connecting the Sensors to the Raspberry Pi
First things first, we need to be able to control the song. We need to connect buttons/sliders/joysticks/... to the raspberry pi. I used 2 buttons and a joystick. The buttons can be directly connected to the raspberry pi but the joystick can't. This is because the joystick consists of 2 potentiometers, one for the x-axis and one for the y-axis, and have analog output values and the rbpi is lacking a ADC (analog to digital converter). That is why I used an arduino atmega 2560 which does have a ADC and let it convert the analog reading value to a I2C data stream which the rbpi is capable of reading.
You can find the code at:
Note that you need to switch the vcc (red) and gnd (black) cables to the buttons (I made a mistake when drawing the image :p).
Upload it to the arduino and connect the I2C to the I2C of the raspberry pi.
Step 2: Building the Software on the RBPI
Next we need to get our code from github and compile the code.
So get the code from and place it on the raspberry pi:
Install the dependencies:
sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-pulseaudio
enter the directory and enter "make".
Now you can run the audio player with
Check out the video for a small demo and enjoy your audio player!
Don't forget to check my site for my other projects:
Participated in the