This is set up to get around university wifi restrictions by hosting the server separately.
If you want to run everything on the Pi, use this repo instead
- /website: (optional) A simple HTML page with a form to send messages to the server
- /server: A flask server to recieve and hold messages, also includes the functionally of /website so you can just point your domain to this
- /client: A raspberry pi client to periodically poll the server for messages and display them on your wall
- A second computer on a network that allows incoming traffic with python 2 installed
- Raspberry pi - any model should work. Zero W + GPIO header & adapters + NOOBs will be cheapest.
- Wifi dongle if the pi does not have wifi chip
- 5v Power supply - DO NOT POWER LEDs DIRECTLY FROM THE PI
- Breadboard and jumper wires (male/male and male/female)
- Level shifter (Reccomended, seems to work without it)
- WS2811 LEDs
- 3' x 4' posterboard, paint, command strips, clear tape
- Open terminal
- Enter "git clone 'https://github.com/CalebKussmaul/Stranger-Things-Wall.git'"
- Enter "cd Stranger-Things-Wall"
- Enter "pip2 install -r server/requirements.txt"
- Enter password and server IP into settings/settings.py
- Enter "python2 -m server" to start the server
- Check that it is running by going to [your IP]:8080/stranger in a browser
- String wires on posterboard and paint letters corresponding to LEDs. Use clear tape to point the LEDs to the letters. I suggest putting the input on the 'z' end if you want to put the pi below the board.
- Install raspbian on pi
- Connect pi and ws2811 LED strip to external 5v power source in parallel (see wiring below)
- Connect LED data wire to the pi GPIO 10 (actual pin number 19, I know it's confusing)
- Install rpi_ws281x library. Follow the special instructions for SPI if you're using a Pi 3.
- From the ws2811 repo, install the included python wrapper (run setup.py 'install' instead of 'build').
- Open terminal
- Enter "git clone 'https://github.com/CalebKussmaul/Stranger-Things-Wall.git'"
- Enter "cd Stranger-Things-Wall/client"
- Enter "pip2 install -r client/requirements.txt"
- Copy settings.py from server, and in stranger.py and adjust character mapping to LEDs as necessary
- Enter "python2 -m client" to start the client
There is also an option to host the web form separately. You might use this if you have a webhost that only allows static content, and you don't want to point your domain directly at your home IP. You will still need to have the server running somewhere, and point the form action to that address.
If you do not need this, simply point your domain to the server and the form will be accessible via http://yourdomain.com/stranger.
If you want to allow messages from the internet, you will need to use your router to port-forward incoming traffic to your external IP to the pi's internal IP on port 80.
Note: technically the data wire takes 5v data, and the pi GPIO outputs on 3.3v. You may need to use a level shifter however it seems to work fine without it for me.
but you can probably get away with this: