I turned this ESP32 into a Tamagotchi nobody asked for

A side view of the Steelcase Leap V2 ergonomic office chair.

My kids have gotten a little obsessed with Tamagotchis recently, so my home is full of the sound of incessant beeping. Seeing them look after their cute little electronic creatures made me wonder if I could build my own Tamagotchi to stop me sitting for too long at a time.

Despite my best efforts, I still sit for far too long

Being sedentary is not good for my health

A side view of the Steelcase Leap V2 ergonomic office chair.

One of the downsides of writing for a living is that I spend a large amount of time sitting in front of a computer. Being too sedentary can be a contributing factor to a whole host of health issues, and even a few minutes of exercise every now and then is better than none at all.

The problem is that when I get in the flow of working on an article, it’s easy to lose track of time. I’ve tried a whole host of methods to force me to get up and move more, from getting my smart speaker to nag me to a Live Activity on my iPhone that shows exactly how long I’ve been sitting down for.

Despite all my efforts, I still find myself sitting for far too long at a time. I figured trying to use a Tamagotchi couldn’t hurt.

I wanted a way to visualize my deteriorating health

A Tamagotchi seemed like the perfect fit

A Raspberry Pi with an OLED screen displaying a Z-list Tamagotchi character.

My idea was that my Tamagotchi’s health would be a way to mirror my own. The longer I stayed in my chair, the more health the Tamagotchi would lose. If I stayed in my chair for too long, the Tamagotchi would die, and I’d have to start all over again.

As well as killing my Tamagotchi if I stayed sitting for too long, I also wanted some kind of reward for continuing to get up and move around. I thought that it would be good if my Tamagotchi could evolve if I managed a streak of a full week of getting up and moving around at least once per hour.

For this to work, I didn’t want to know what the evolved Tamagotchi would look like, so that I would have more incentive to complete my streaks and watch my Tamagotchi grow. I used ChatGPT to design the images without showing them to me, so that the only way I could find out what they looked like was by completing my streaks.

A Cheap Yellow Display and a presence sensor were all I needed

Home Assistant tracks how long I sit for

I wasn’t going to build an entire tiny electronic device for this project, which would have been serious overkill. Instead, I decided to use a Cheap Yellow Display (CYD). This is an ESP32-based board with a built-in color touchscreen display, which I figured would be perfect for displaying my Tamagotchi character and the health and streak bars.

The final piece of the puzzle was adding a way to track when I’m sitting at my desk and when I’m standing up. I’d already figured this out for my other automations. I use an mmWave presence sensor in my home office, with a detection zone set up that covers where my office chair is located.

The sensor is accurate enough that it detects my presence when I’m sitting in the chair and is able to tell when I get up and walk away. This information is shared from Home Assistant to the CYD through ESPHome. I used Codex to generate the ESPHome YAML to run my Chair Goblin Tamagotchi, so I wouldn’t know when the character would evolve or what would happen when it did.

Curiosity is enough to keep me getting up

I really want to see how my goblin evolves

Cheap Yellow Display Tamagotchi showing Chair Goblin at level 3 with 0 percent health and the Goblin has died message.

So far, the Tamagotchi is really helping. Seeing the Tamagotchi get physically frail the longer I sit in my chair is a powerful visual reminder of the damage I could be doing to my own health. Since I have no way to stop the Tamagotchi from dying other than getting out of my chair, it forces me to get up and take a break.

The evolution aspect is also a genuine incentive. I’ve earned a couple of evolutions so far, and it’s great to see my character grow legs and gain accessories. It gives me even more reason to get up, since if my goblin dies, I’ll have to start all over again. Keeping my Tamagotchi healthy is helping me to keep healthy, too.

AI chatbots make it easier to make your own ideas happen

The concept behind my Tamagotchi is fairly simple. It just monitors how long I’ve been sitting and updates the health accordingly, with the Tamagotchi image changing as the health drops. I could have made it from scratch, but it would have taken a fair amount of time, especially creating the Tamagotchi images. Using AI chatbots can make it far easier to go from idea to finished product.

Leave a Comment