diff --git a/docs/broadcaster-software.md b/docs/broadcaster.md similarity index 100% rename from docs/broadcaster-software.md rename to docs/broadcaster.md diff --git a/docs/how-to-turn-it-on.md b/docs/how-to-turn-it-on.md new file mode 100644 index 0000000..a833cad --- /dev/null +++ b/docs/how-to-turn-it-on.md @@ -0,0 +1,37 @@ +# Hardware setup instructions +This readme contains insructions for plugging in the system and turning it on. Full software setup documentation is in the broadcaster-software.md and listener-software.md files. + +Make sure to do the following steps in the order they are listed: + + +## Requirements +* Modem and internet plan with a static public ip address. +* Provisioned [broadcaster](broadcaster.md) +* Provisioned [listener](listener.md) + +## Steps + +### Turn on broadcaster +1. Plug the usb mic cable into a microphone +2. Plug the usb mic cable into the top right (blue colored) usb port on the broadcaster (raspberry pi 4b) +4. Plug the ethernet cable into the broadcaster and the router +5. Plug the power into the broadcaster (this is how you turn it on) + + +### Networking +6. Log into the router. +7. Find the ip address of the broadcaster (hostname portal) - usually in the advanced > network > dhcp. +8. Navigate to the NAT forwarding section of the router admin. +9. Set your router to forward all traffic coming in on port "80" to port "8000" at the local ip address of the broadcaster. +10. Set your domain name to point to the static IP address of your modem. + +### Turn on listener +1. Turn on the listener (raspberry pi zero). plug it into a monitor and keyboard. when it boots, type sudo raspi-config. navigate to system settings and change the wifi settings so it can access the internet. +2. Type sudo vim /lib/systemd/system/listener.service and edit the line that says "ExecStart=mplayer -playlist http://" changing the http:// part to the static ip address of the router. +3. Type esc, w, q, enter +4. Type sudo systemctl restart listener +5. mic check + +### Important notes +* The microphone must always be plugged into the broadcaster before the broadcaster is on +* The broadcaster must always be on when the listener is turned on. if it is not, then the listener needs to be restarted once the broadcaster is on. \ No newline at end of file diff --git a/docs/listener-lcd-screen-software.md b/docs/listener-lcd-screen-software.md new file mode 100644 index 0000000..38c1b47 --- /dev/null +++ b/docs/listener-lcd-screen-software.md @@ -0,0 +1,20 @@ +# Listener LCD Screen Software + +The following instructions requier a fully provisioned and working [listener](listener.md) to work. + +## To get started working on the software: +1. git clone git@git.featherboaz.com:boazsender/portal.git +2. cd portal +3. npm install +4. npx prisma generate && npx prisma db push && npx prisma db seed + +## To deploy the software +While on the same network as the listener end of the system: + +1. ask the maintainer to put your ssh key on the listener +2. npm run deploy + +This will build the project and copy it to the listener. You may need to restart the software on the listening device. You can do that with: + +3. ssh grace@listener.local +4. sudo systemctl restart screen \ No newline at end of file diff --git a/docs/listener-software.md b/docs/listener.md similarity index 97% rename from docs/listener-software.md rename to docs/listener.md index e527503..b64db25 100644 --- a/docs/listener-software.md +++ b/docs/listener.md @@ -10,7 +10,7 @@ Running mplayer, soundcard library, lcd graphics library, and custom python code * Waveshare UPS with 1000mah battery - https://www.waveshare.com/ups-hat-c.htm * Waveshare sound card hat with speakers- https://www.waveshare.com/wm8960-audio-hat.htm * 1602 LCD screen - https://www.waveshare.com/lcd1602-i2c-module-blue.htm?sku=30496 -* Jumper wires - https://www.waveshare.com/product/accessories/adapters-cables-antennas/jumper-wires.htm +* Jumper wires - https://www.waveshare.com/product/accessories/adapters-cables-antennas/jumper-wires/jumper-wire-1-pin-2.54-pitch-200mm.htm * mini HDMI to hdmi cable - https://hosatech.com/products/video/hdmi/hdmc-400/ * micro USB male to usb a femail adapter - https://www.amazon.com/dp/B01C6032G0 * Keyboard with usb a cable - https://www.amazon.com/AmazonBasics-Matte-Keyboard-QWERTY-Layout/dp/B07WJ5D3H4/ diff --git a/docs/readme.md b/docs/readme.md index 697a5a5..3db7b40 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -1,38 +1,21 @@ -# Black Portal Detroit internet radio electronics -https://blackportaldetroit.com +# Internet radio electronics for Black Portal Detroit +Electronics and software for the Black Portal Detroit work By Wes Taylor for the [Code Switch show at at MOCAD](https://thekitchen.org/on-view/code-switch-distributing-blackness-reprogramming-internet-art/). Electronics and software built and written by Boaz Sender based on Wes' concept and at Wes' direction. -This repo contains documentation for how to buy and setup the electronics for Black Portal Detroit. This readme contains insructions for plugging in the system and turning it on. Full software setup documentation is in the broadcaster-software.md and listener-software.md files. +## Software provisioning and setup +This repository also contains documentation for how to buy and setup the electronics for Black Portal Detroit. +1. Broadcaster bill of materials and software setup instructions in [broadcaster.md](broadcaster-software.md) +2. Listener bill of materials and software setup instructions in [listener.md](listener-software.md) -## Hardware setup instructions -Make sure to do the following steps in the order they are listed: +## Custom software +This repository contains custom software for turning a m3u radio stream into a logic for random selection of lyrics from an sqlite database of song stanzas written by Detroiters from the neighborhood where MOCAD is. -### Turn on broadcaster -1. plug the usb mic cable into a microphone -2. plug the usb mic cable into the top right (blue colored) usb port on the broadcaster (raspberry pi 4b) -4. plug the ethernet cable into the broadcaster and the router -5. plug the power into the broadcaster (this is how you turn it on) +3. Custom software development instructions in [listener-lcd-screen-software.md](listener-lcd-screen-software.md) +## Turning on the devices +4. The sequence for turning on the system is in [how-to-turn-it-on.md](how-to-turn-it-on.md) -### Networking -1. Log into the router. -2. Find the ip address of the broadcaster (hostname portal) - usually in the advanced > network > dhcp. -3. Navigate to the NAT forwarding section of the router admin. -4. Set your router to forward all traffic coming in on port "80" to port "8000" at the local ip address of the broadcaster. +Prior research that didn't work in `research-` md files. -### Turn on listener -1. turn on the listener (raspberry pi zero). plug it into a monitor and keyboard. when it boots, type sudo raspi-config. navigate to system settings and change the wifi settings so it can access the internet. -2. type sudo vim /lib/systemd/system/listener.service and edit the line that says "ExecStart=mplayer -playlist http://" changing the http:// part to the static ip address of the router. -3. type esc, w, q, enter -4. type sudo systemctl restart listener -5. mic check - -### Important notes -* the microphone must always be plugged into the broadcaster before the broadcaster is on -* the broadcaster must always be on when the listener is turned on. if it is not, then the listener needs to be restarted once the broadcaster is on. - -## Software setup instructions -* Broadcaster software setup instructions in broadcaster-software.md -* Listener software setup instructions in listener-software.md - -Prior research that didn't work in `research-` md files. \ No newline at end of file +## Live access +5. If everything is turned on and configured properly, you may visit https://blackportaldetroit.com to hear the broadcaster. diff --git a/package.json b/package.json index 02ca341..6628d6f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "main": "index.js", "scripts": { "build": "tsc screen.ts", - "deploy": "npm run build && rsync -avx rsync -a --exclude-from='exclude.txt' ./ grace@192.168.0.195:portal" + "deploy": "npm run build && rsync -avx rsync -a --exclude-from='exclude.txt' ./ grace@listener.local:portal" }, "repository": { "type": "git",