Introduction: Playing Music With Your Intel Edison
Who else loves music? I bet those who do will find this Instructable interesting and fun to do. There are so many single-board computers that we all have and love including Raspberry Pi, Beaglebone and now the Intel Edison. These computers really are computers, in that they run a full operating system, Linux. In this Instructable, I will be guiding you in setting up a mp3 player on your board and playing music via external speakers using a USB sound card. These steps may or may not work on other boards like the RPi or Beaglebone.
Also, I want to thank Intel for selecting me and 99 others to receive an Intel Edison board. Thank you!
Step 1: Getting Ready
Most of the Intel Edison tutorials and projects uses Edison in the device mode. Here I will be using it in the control mode. This will let the board control the USB port.
For switching to control mode flip the small switch beside the USBs port towards the large USB port and power supply port. Now power it up using a 7-15v power adapter.
Now that it in USB mode, connect the serial port to your computer and access the linux system of Edison using PuTTy.
Note: If you are a MAC or linux user then no need to use PuTTy.
You can downlaod PuTTy from here - http://www.putty.org/
Step 2: Accessing Linux Mode
Now that puTTy is downloaded, open it in serial mode.
Set the COM port number to serial port. This can be found in Device manager>Ports>USB Serial Port.
[In mine its COM20]
The speed is also set to 115200. Now click open. This should show you a blank screen. Press Enter once.
It should now be asking for your login. Type root and press enter. You should now be able to access linux mode.
To access Wi-Fi to download packages type:
configure_edison --wifi
This should give you the names of all available ssids.
Now to check if the connection is established type:
ping -c5 www.google.com
Step 3: Installing Packages
Package Manager:
You need to configure your opkg repository to include the following lines:
src/gz all http://repo.opkg.net/edison/repo/all src/gz edison http://repo.opkg.net/edison/repo/all src/gz core2-32 http://repo.opkg.net/edison/repo/all
Do so by typing:
vi /etc/opkg/base-feeds.conf
Now that packages have been downloaded, we have to install alsa utils and mpg123. Type this code to install it:
opkg install alsa-utils
opkg install mpg123
Step 4: Connect USB Sound Card
Connect your USB sound card to the Edison board. Check that necessary modules are loaded and OS sees the device:
lsmod
lsusb
Here C-Media Electronics [Shown in pic] is my device.
Now to see if ALSA also sees your card:
aplay -Ll
Step 5: Testing
Now try playing something using the basic aplay utility.
aplay /usr/share/sounds/alsa/Front_Center.wav
You should hear "Front Center" being pronounced.
Step 6: Loading Songs
Now upload some songs onto a sdcard and connect it to the Edison board.
The songs should be listed under
Now to play any of the songs uploaded onto the sdcard type the following command:
mpg123 -C <SongName.mp3>
To play all the songs in a folder/playlist:
mog123 -C /media/sdcard/<Foldername>/*
You can pause/continue by pressing
To stop press
For help with options press
So here you go, your very own mp3 player. Thank you!