-
1Cut the Acrylic Inner Shelf
Probably the first step as you need a spot to work
-
2Mount the Raspberry Pi and Relay Board
To do this use Nylon screws and nuts and attach them to the boards first (so there is a nut between the board and the screwhead before you put it on the inner shelf. Once you have both boards on the shelf you can use another nut to hold the board in place. So one nut props up the board off the acrylic and keeps it even and the second holds it in place.
Then cut off the excess thread of the nylon screw with some side cutters
-
3Crimp wires into headers
I did this differently so I have a bit of excess wire but with the boards mounted you should be able to make a nice clean fit so there isn't too much excess cabling. The GPIO pinouts I used are in the code under the helper function
-
4Power Button Hookup
The power on/off battery was pretty much following another guide. I think I used physical pins 5 and 6. If you want to be clever you should add a quick connect so you can connect your button to the Raspberry Pi header so it's easy to change the button if needed.
https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi
-
5Configure the Pi!
Basically do the imaging of a SD card with a basic Linux image, there are no shortage of guides but I used the Raspberry Pi Imager available at https://www.raspberrypi.org/software/
-
6Do the other bits to make the power button work
Remember that guide for hooking up the power button? Follow that because the git code and install instructions are really good and it works well. And as a positive it is the first place you can test your Raspberry Pi W GPIO pins are working. The first Zero I tried to use the pins were not attached great and I spent a lot of time software troubleshooting a hardware problem
-
7Check the Relays
It is probably helpful to test your relay works at this point too if its hooked up. I included my test relay script (that has pin outs and different ways to set the relays)
-
8Do the bits now to make the Twitch Relay work
So now you need my code and for that you also need to get an API key from the Twitch Developer area. There is more setting and information about the code over on Github so check that out (plus if I have to make a change I can do it there). You might also need to adjust the log file paths for the moment
-
9Do some testing
You can run this on your own channel but if you want to channel surf you can find channels who are currently having hype trains on Twitch - https://www.twitch.tv/directory/all/tags/c2839af5-f1d2-46c4-8edc-1d0bfbd85070
-
10Setup the script to run at startup
I added the script to my bash.rc file to run when someone logs in and then set the pi to automatically log in. But to do that I also then had to set the log file directories to be absolute. Short version here is, I did it this way but there are 4 other ways you could do the run at startup bit. I have more detail on github but basically however you want to do it. I went the most plug and play option
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.