A Radio to resurface songs from your past.

Follow these instructions to setup a new OLO product.
If you already have a SD card from a working OLO, follow this instruction to create an SD card image and load on to the new card. This would only take about ~15 minutes to create an image, and <10 minutes to load. Once finished, insert the copied card and you're ready to go!
Otherwise, let's create a brand-new OLO :)
Follow instructions HERE.
Choose one of two links below to install Raspbian OS. Set id/pw to pi/oloradio. You can change the password directly in Raspberry Pi configuration settings: sudo raspi-config.
-
Raspbian-Lite released by HiFiBerry
- Default id/pw is
pi/raspberry, change the password to:pi/oloradio
- Default id/pw is
First, run sudo df -h to check the volume of the root partition. If it's less than 16.0 G, resize the partition volume. Follow the guide in the EverydayDesignStudio's guide.
Once you confirm that you have enough space for the root partition, follow the article to installing GUI on Raspbian Lite. It will guide you through setting time zones, locales, keyboard settings and packages for GUI.
**GUI is required for OLO to retrieve an authentication token for the Spotify Web API. **
Install VNC to enable remote control with GUI.
- Open
sudo nano ~/.bashrc - Add the following on the bottom:
alias python=python3
Register oloLauncher.sh and oloUpdater.sh scripts to automatically start and update on boot.
- Navigate to OLO folder:
cd Desktop/olo - Make two scripts executable:
sudo chmod 755 oloLauncher.sh
sudo chmod 755 oloUpdater.sh - Open Crontab:
sudo crontab -e - Add two lines on the bottom to register scripts to run at a specific time:
@reboot sh /home/pi/Desktop/olo/oloLauncher.sh
0 4 * * * sh /home/pi/Desktop/olo/oloUpdater.sh
cd ~/Desktop | git clone https://github.com/EverydayDesignStudio/olo.git
- If you get an error because you have not set up the Git or Github, see Git guide
Fresh Raspbian OS will have Python2, Python3 and Git installed by default
- Update apt-get, Pi and Python
sudo apt-get update
sudo apt-get install build-essential python-pip python3-pip python-dev git
sudo apt-get install python-smbus
sudo apt-get upgrade
sudo pip3 install --upgrade setuptools
(if this doesn't work, try sudo apt-get install python3-pip)
GPIO: sudo pip3 install RPI.GPIO
Adafruit Blinka: sudo pip3 install adafruit-blinka
Adafruit MCP3008: sudo pip3 install adafruit-circuitpython-mcp3xxx
- Packages for the back-end code
-
sqlite3:
sudo apt-get install sqlite3 -
raspotify:
curl -sL https://dtcooper.github.io/raspotify/install.sh | sh
Need to modify the config and restart raspotifysudo systemctl restart raspotify -
spotipy:
sudo python3 -m pip install spotipysudo python3 -m pip install git+https://github.com/plamere/spotipy.git --upgrade
If there is an error sayingSpotipy (or Spotify) object does not have an attribute ..., locate the spotipy packagepip show spotipyand replaceclient.pyto the latest code from HERE -
pylast:
sudo python3 -m pip install pylast
Configure Hifiberry
- Skip this step if you installed Raspbian-Lite, released by HiFiBerry.
Follow the instructions HERE. Use "DAC+ standard/pro".
In /boot/config.txt,
dtoverlay=hifiberry-dacplus
-
Top left menu > Config > check "Enable SSH"
-
OR, run the following command:
sudo systemctl enable ssh | sudo systemctl start ssh
sudo raspi-config > "5. Interfacing options" > check "Enable VNC"
The purple OLO PCB (control board) connects the several hardware parts to the raspberry pi. These components are illustrated in figure 1. Make sure the board is connected to a 5V power source (min. 15W); the DC-DC converter (labelled ‘power supply’) in combination with the 9V 2A power adapter suffices. In figure 1, you can also see how these components are connected to the control board. Every white connector on the control board is labeled with white lettering on the board itself to denote what is connected to it. For the purpose of not mistaking the two, the power connector and the motor connector are a different type of connector. The volume knob and the three-pole switch though, are identical; so keep that in mind if you ever need to connect these.
The OLO radio control board and its components
In order to interface with the components (through the olo PCB), make sure that the olo PCB is connected to the RPi properly. The RPi has a 2x20 male header (see figure 2) which fits the olo PCB. You might notice that the OLO PCB (v2.2) hits the Ethernet adapter when connected directly on the RPi. This is going to be fixed in later revisions of the board, but is not an issue that impedes the functionality of the board.
When the OLO PCB is connected to the RPi, make sure the RPi is connected to a 5V power source (such as a 5V power adapter that can be plugged into the mains). When the RPi is powered up, a power LED should light up on the RPi.
A 2x20 male header (left) and a 2x20 female header (right)
When writing code for OLO, import the oloFunctions.py file into your python code. In this file, functions are defined for several functionalities, briefly described in each functions’ comments. You will find that oloFunctions.py is imported in several other scripts in the olo repository. Another recurring file is sh.py; this file contains global variables that are shared between scripts.
When using sh.py in your file, make sure to both import it: import sh
As well as initialize it: sh.init()
The latter simply calls a function inside sh.py that initializes all global variables. For more information on the hardware components, I would advise on doing a web search on the parts’ model number. Datasheets of the ALPS motor-fader and most components that are on the OLO board can be found in the olo folder on the EDS dropbox.