Here are a few python scripts to make your unicorn phat into a badge. If I was better at scripting, I would provide one of those fancy setup scripts that would do all the things on your raspberry pi, but I'm not so... here are some sort of manual instructions.
- Set up your raspberry pi by flashing the operating system onto an SD card. I suggest Lite since we won't be using a screen but you do you.
- Set up the pi to connect to your network following these instructions.
- While you're adding
wpa_supplicant.conf
, also create an empty file calledssh
. It will enable connecting via SSH. - Connect to it via SSH. Run
ssh pi@raspberrypi.local
and use the passwordraspberry
. - Follow the instructions to install the Pimoroni unicorn hat libraries here.
- Move the partypi python scripts from your computer to your raspberry pi. You can use SFTP to move files between your computer and the pi.
- Run
sudo python party.py
orsudo python radtag.py
.
On mine, I set up cron some time ago to run party.py
at boot. Definitely handy for a badge. This way the blinky lights start when it's powered up.
I followed this guide to set up auto hotspot detection. When I'm at home, it connects to my network. When I'm out and about, it creates its own. This lets me give it commands with my phone if I want to change what is running.