Skip to content

Commit

Permalink
Merge installation instructions for all Pis and link out to SD card s…
Browse files Browse the repository at this point in the history
…teps
  • Loading branch information
andrewn committed Dec 13, 2016
1 parent 0051d9c commit cc58db4
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 128 deletions.
94 changes: 0 additions & 94 deletions INSTALL-PIZERO.md

This file was deleted.

81 changes: 81 additions & 0 deletions INSTALL.MD
@@ -0,0 +1,81 @@
# Installation on a Pi

## Hardware

* Raspberry Pi (tested on Zero and Pi 3)
* 8GB SD card
* data USB micro cable (watch out for power only ones!)
* soldered phat dac or USB audio card
* 3.5m jack headphones or mini speaker

## Image an SD card

[Download latest "Raspbian Jessie with Pixel" or "Raspbian Jessie Lite"](https://www.raspberrypi.org/downloads/raspbian/).

Use [Etcher](https://etcher.io/) to easily flash Jessie onto an SD card.

When done but before ejecting

touch /Volumes/boot/ssh

### If using the Pi Zero

[Follow these instrutions to make it connectable over USB](http://blog.gbaman.info/?p=791). You need to share your wifi over ethernet and "RNDIS / Ethernet Gadget" and connect to your laptop via its micro USB port (not its power port) using the cable.

This will both power the pi zero and allow you to connect to it.

## If using another Pi

Connect an Ethernet cable or set-up wifi. Power as normal via it's power input.

## Steps for all Pis

Install chromium and xvfb:

sudo apt-get update
sudo apt-get install rpi-chromium-mods xvfb

## Install node


Use [radiodan provisioning](https://github.com/radiodan/provision) to install node and also to make everything on port 80 forward to port 5000.

Once you've followed the setup instructions there:

sudo ./provision node ip-tables

## Install pHat DAC if using

curl -sS get.pimoroni.com/phatdac | bash

## Install code

Install the manager and example app:

mkdir /opt/radiodan
git clone https://github.com/andrewn/neue-radio rde
cd rde/manager
npm install --production
cd ..

Install the physical interface manager:

cd physical
JOBS=MAX npm install --production # use all cores
cd ..

Install scripts to manage processes:

sudo cp systemd/* /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start manager

Run on boot:

sudo systemctl enable manager
sudo systemctl enable manager-web-server
sudo systemctl enable physical

## Play some audio

Go to http://raspberrypi.local:5000/radio/ and choose a file to play.
36 changes: 2 additions & 34 deletions README.md
Expand Up @@ -8,8 +8,9 @@ What is this?
A basic sketch of how things could work if a headless web browser instance was used to playback audio on an embedded linux device like the Raspberry Pi.

This forked version of Andrew Nicolaou's work adds websockets to connect the public and private radio pages.
### Installation

See INSTALL-PIZERO.md for detailed instructions.
See [INSTALL.md](INSTALL.md) for detailed instructions.

How does it work?
---
Expand Down Expand Up @@ -64,37 +65,4 @@ This initial implementation doesn't do very much. [radio/index.html](radio/index

In a future version it would be good to present a simple remote control that allows you to play/pause the stream.

## Installation on a Pi

Install chromium and xvfb:

sudo apt-get update
sudo apt-get install rpi-chromium-mods xvfb

Install the manager and example app:

mkdir /opt/radiodan
git clone https://github.com/andrewn/neue-radio rde
cd rde/manager
npm install --production
cd ..

Install the physical interface manager:

cd physical
JOBS=MAX npm install --production # use all cores
cd ..

Install scripts to manage processes:

sudo cp systemd/* /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start manager

You should hear some radio playing out of the default speakers!

Run on boot:

sudo systemctl enable manager
sudo systemctl enable manager-web-server
sudo systemctl enable physical

0 comments on commit cc58db4

Please sign in to comment.