Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This code supports the MotivatioStation Project. The intent is to create interactive art where individuals can share inspirational and motivational moments.

Ideally someone will walk up to your creation, press a button (or some other interaction) and receive words of positivity, encouragement and inspiration from others.

Recordings are sourced from around the world, with individuals able to record and submit anywhere in the world.

For more remote locations the recordings can be updated on site, using simple software on Android devices to record, edit and add files to the directory.

This code is built for the Raspberry Pi on Raspbian Lite (Jesse)

*Preparing for install

sudo apt-get update

sudo apt-get upgrade

*Wireless AP for uploading recordings


Remove WPA Supplicant

sudo apt-get purge wpasupplicant

install dhcp server

sudo apt-get install isc-dhcp-server

setup dhcp

sudo nano /etc/dhcp/dhcpd.conf

and add the following:

subnet netmask { range; option domain-name-servers; option routers; interface wlan0; }

setup hostapd

sudo apt-get install hostapd

Special Edimax Steps

I am using Edimax Nano USB EW-7811Un (RTL8188CUS chipset) wifi dongle so the following sets are only needed if you use this Chipset. Other dongles that support AP mode should work without this step.

wget unzip sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak sudo mv hostapd /usr/sbin/hostapd.edimax sudo ln -sf /usr/sbin/hostapd.edimax /usr/sbin/hostapd sudo chown root.root /usr/sbin/hostapd sudo chmod 755 /usr/sbin/hostapd


sudo nano /etc/hostapd/hostapd.conf

interface=wlan0 driver=rtl871xdrv bridge=br0 ssid=INSERT NAME OF AP HERE channel=1 wmm_enabled=0 wpa=1 wpa_passphrase=CHANGE THIS PASSWORD wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP auth_algs=1 macaddr_acl=0


interface=wlan0 driver=nl80211 ssid=INSERT NAME OF AP HERE hw_mode=g channel=11 wpa=1 wpa_passphrase=CHANGE THIS PASSWORD wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP CCMP wpa_ptk_rekey=600 macaddr_acl=0

setup interfaces

sudo nano /etc/network/interfaces

#looopback adapter auto lo iface lo inet loopback #wired adapter iface eth0 inet dhcp #wlan allow-hotplug wlan0 iface wlan0 inet static address netmask

Test for errors

sudo ifconfig wlan0 sudo /etc/init.d/isc-dhcp-server restart sudo hostapd -d /etc/hostapd/hostapd.conf

Make wireless AP persistent

sudo nano /etc/network/interfaces

and add the following:

auto wlan0 iface wlan0 inet static address netmask

sudo nano /etc/rc.local

and add the following:

hostapd -B /etc/hostapd/hostapd.conf iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

sudo nano /etc/sysctl.conf

And add the following:

net.ipv4.ip_forward = 0

*Installing MotivationStation on Pi

sudo apt-get install alsa-utils mpg321 python-dev python-rpi.gpio

We specify "/home/pi/Motivation" in the code, this can be changed if you would like, but to use in it's default setting:

*Create a folder named "Motivation" in "/home/pi/"using

mkdir -m 777 Motivation

while in "/home/pi/"

*copy to "/home/pi/" or

sudo nano

and copy/paste code

*Run at Startup We want the script to run at launch so we create a cron job by typing

sudo crontab -e

'sudo' gives us the admin cron


@reboot python /home/pi/ &

This tells Cron that every boot (or reboot or start-up) we want to run Python with the script The “&” at the end of the line means the command is run in the background and it won’t stop the system booting up as before.


This folder is where you house your audio recordings.

I tend to access this folder via sftp as it's ready to go with stock Raspbian Copying any files to this folder adds them to the potential lsit of files played.

I used GPIO 18, you can feel free to adjust the code to your liking.

The button should have a 10k Pull Up Resistor but doesn't seem to need it so ¯_(ツ)_/¯


Connect to the wireless network you created and login with the credentials.

Recording can be done on any Android device (I assume iOS but never tested)

Format must record in mp3, I've had luck with RecForge since it recordin in mp3 format (no need to convert) and had a built in editor.

File Transfer is done over sftp. Any FTP app will work that support it, I use AndFTP.

Point at and enter your pi username and password (NOT WiFi pass)

Navigate to the /Motivation folder and upload your mp3s

Reboot the pi and the new audio will get incorporated!




At some point i want to integrate the LEDs. For now they are going to run separate with an arduino or ws2811 controller.


Code for art project



No releases published


No packages published


You can’t perform that action at this time.