I created Macagotchi for macOS and Windows as the less sinister cousin of the amazing and occasionally illegal, pwnagotchi. I had a fun time feeding my macagotchi and building up a good streak, but I wanted a more portable version, so I set out to build one for the Raspberry Pi.

Looking for source code and other important links? Click here.

What is it?

Macagotchi Pi is a port of the macOS and Windows Macagotchis, specifically for the Raspberry Pi Zero 2W, but if you want to try another Raspberry Pi it should still work. Like the desktop versions, Macagotchi scans for unique SSIDS (WiFi network names), which it stores in a hashed log, the more of them it finds, the happier it gets, but if it finds none it gets hungry and becomes sad. Macagotchi Pi uses Waveshare’s 2.13inch Touch E-Paper HAT to show screen updates, allowing it to stay on for longer periods of time, letting you scoop up even more SSIDS!

Key Takeaways

Screen update time:

One of the main challenges with using an E-Paper screen is the fact that the update times are often much slower. A normal digital display can update at 60hz or 60 frames per second, while many E-Paper screens can only update every 3 minutes or so without  getting damaged in the medium/long term. This means that Macagotchi Pi has to have a GUI that is more compatible with slower update speeds. Macagotchi Pi scans every 30 seconds, and after 6 scans (3 minutes) updates the display with what it found. 

This means that toggling wardriving mode on and off is not included in this version, as the device scans frequently by default.

Daily Commentary and emotions:

Because a Raspberry Pi equipped with an E-Paper screen uses much less electricity than a laptop, Macagotchi Pi can run for hours on an average power bank. On the desktop versions, Macagotchi’s emotions and commentary are based off the new SSIDS found from that session. On the Pi, commentary and emotion had to be modified for data from that day, considering that Macagotchi Pi is a dedicated device and people will care a lot more about their Pi staying happy throughout the day. This meant a complete change to the Commentary and Emotions system. 

Tl;dr because it can’t update the display every few seconds, it updates less frequently and based on aggregate data rather than real time.

Off button:

Because the Pi is a dedicated device, only displaying the Macagotchi application, I had to build a simple way for the user to deactivate the device. E-Paper displays also prefer to be wiped when being shut down for long time periods so as to reduce burn in. So I built a simple off button which detects when the users clicks it, resulting in the screen being wiped, shut down, and finally triggering the Pi itself to shut down as well. Far more elegant than just unplugging the power and killing the Pi mid thought.

E-Paper Drivers:

Once I had set up the E-Paper display (the Waveshare 2.13inch Touch E-Paper HAT) I took a look at the documentation and drivers from Waveshare. No matter what I tried, the screen wouldn’t change, and nothing would display. Eventually I realised that I was using the demos and drivers for the Waveshare 2.13inch E-Paper HAT display instead of for the Waveshare 2.13inch Touch E-Paper HAT🤦‍♂️. 

Once I had the correct drivers and some examples, documentation (and a bit of help from ChatGPT), I eventually learnt how to write text and draw images to the screen, as well as how to refresh, wipe and shut it down.

Automatic Boot with Crontab:

To keep the use of Macagotchi simple, I used crontab to automatically boot Macagotchi on startup of the Pi. This was the second time I had ever used crontab so there were a lot of kinks to figure out. Once I had figured out that crontab runs things from the root directory (one of my biggest takeaways), and how to access its log by using the grep CRON /var/log/syslog command, I eventually got it working.

I learnt a lot of things from this project, from how to make a cronjob to using E-Paper Touch display drivers. Working on a project with many limitations and special features was a great learning experience, and I heavily enjoyed finally releasing it. I hope you like it just as much as me. The code is of course hosted on GitHub for anyone to use and fork. Happy scanning!

Important Links


GitHub Repo’s:

Other Sites: