October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Arduino

Macrogatchi: An ESP32 Tamagotchi-Style Virtual Pet Prototype

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Macrogatchi is a GPLv3+-licensed, beginner-level ESP32 virtual-pet project published by Make It for Less on Hackster.io on July 21, 2023. It combines a color ILI9488 display, physical controls, a buzzer and PNG graphics stored in ESP32 LittleFS to reinterpret the classic Tamagotchi idea on larger, inexpensive hardware. The page labels it a work in progress: it is a useful learning platform and prototype, not a finished commercial Tamagotchi replacement or an officially licensed Bandai product.

The project page estimates about five hours and lists one ESP32 development board, one ILI9488 LCD, three DFRobot Gravity digital push buttons and Arduino IDE. The code shown on the page implements movement, feeding, timed care statistics, sound and image rendering, but several advertised or implied features remain incomplete or undocumented.

What Macrogatchi is trying to build

Macrogatchi is a custom ESP32 virtual pet inspired by 1990s Tamagotchi toys. Its larger color screen gives the pet room to move and display illustrated food and expressions, while the ESP32 supplies GPIO, flash storage, sound control and enough processing power for PNG decoding.

The Hackster listing frames the project as an evolution of the concept, but that wording should not be read as a product announcement. It is a maker build, marked “Work in progress,” and the author says the accompanying video covers the goals, parts and code only briefly. It is best understood as an early-stage electronics project that invites modification.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA Compatible with Arduino IDE (3PCS)
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Support LWIP protocol, Freertos
  • SupportThree Modes: AP, STA, and AP+STA
  • Ultra-Low power consumption, Compatible with Arduino IDE
  • ESP32 is a safe, reliable, and scalable to a variety of applications

Project page: Hackster.io Macrogatchi.

Parts listed—and what the list leaves out

Part Quantity listed Role What is and is not established
Espressif ESP32 Development Board—Developer Edition 1 Main processor, GPIO and flash storage Listed by the project; the exact board revision is not specified.
ILI9488 LCD 1 Color graphics display The exact breakout, resolution, interface, voltage arrangement and orientation are not stated.
DFRobot Gravity digital push button, yellow 3 Physical controls Three are listed, but the shown sketch configures and reads only the first button.
Buzzer Not listed in the component table Feeding sounds BUZZER_PIN 5 appears in the sketch; the buzzer type and wiring are not documented.
PNG image assets Required Background, pet, food and animation frames The page says to upload them to ESP32 internal memory.
Power, wiring and enclosure hardware Not stated Physical operation No complete bill of materials, battery system, charging circuit or enclosure design is provided.

The author links the code, images and upload instructions through the Macrogatchi GitLab repository. Its current contents, maintenance status and exact workflow should be checked before building; the 2023 page does not establish compatibility with every current ESP32 board or Arduino toolchain.

Software architecture

The sketch is Arduino-compatible C++ and combines several straightforward components:

  • LittleFS.h reads image files from ESP32 flash storage.
  • PNGdec.h decodes PNG data.
  • SPI.h supplies the display bus.
  • TFT_eSPI.h drives the TFT panel.
  • A custom pitches.h header supplies musical-note frequencies.
  • A creature class handles movement, feeding, status values and mood selection.

The published configuration includes:

#define BUTTON_PIN_1 20
#define BUTTON_PIN_2 21
#define BUTTON_PIN_3 22
#define BUZZER_PIN 5
#define MAX_IMAGE_WIDTH 320
#define WIDTH 200
#define HEIGHT 200

These are the author’s settings, not universal ESP32 or ILI9488 pin assignments. GPIO availability varies by board, and the display must be configured in TFT_eSPI for the exact controller and wiring.

What happens during startup and in the main loop

The shown setup() optionally starts serial debugging, configures only BUTTON_PIN_1 with INPUT_PULLUP, starts LittleFS, initializes the TFT, fills the screen blue, defines the taco image paths and draws the background. If FileSys.begin() fails, the sketch enters an endless yield() loop, so a filesystem problem can look like a frozen device.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
ELEGOO 3PCS ESP-32 Dev Boards, ESP-WROOM-32, USB-C, WiFi Bluetooth 4.2
  • Dual-Core Performance Up to 240 MHz: Run sensor processing, wireless communication, automation logic and connected-device tasks on a 32-bit dual-core ESP32 platform designed for responsive embedded and IoT projects
  • Built-in Wi-Fi and Bluetooth 4.2: Connect to 2.4 GHz Wi-Fi networks or use Bluetooth Classic and BLE for wireless sensors, smart devices, remote controls, home automation and other connected projects
  • Flexible Power-Saving Modes: ESP32 power-management features support dynamic clock scaling and low-power operating modes, helping developers reduce energy use in compatible sensing, monitoring and connected-device applications, suitable for battery-powered Internet of Things (IoT) devices.
  • USB-C Programming with CP2102: Connect through USB-C for power, sketch uploads and serial monitoring, while GPIO, UART, SPI and I2C interfaces support sensors, displays, motor drivers and other modules (USB-C cable not included)
  • Over-the-Air Update Support: Configure OTA functionality through a compatible ESP-32 software framework to update deployed firmware over Wi-Fi without reconnecting the board by USB for every revision

The main loop is essentially:

g.updateCreature();

if (!digitalRead(BUTTON_PIN_1)) {
  g.feedCreature(taco);
}

g.moveCreature();

That means status values are refreshed, a low reading on the first button starts feeding, and the creature moves afterward. The shown code has no handlers for buttons 2 and 3, cleaning, toilet use, a sleep button, games, networking or saved progress.

Care statistics and mood logic

The creature stores several 8-bit values. They begin at hunger = 0, happiness = 255, cleanliness = 255, bladder = 0 and sleepiness = 0.

After more than approximately one minute, the update routine applies the published rules:

  • Hunger rises by 5, capped at 255.
  • Cleanliness falls by 5, stopping at 0.
  • Bladder rises by 5, capped at 255.
  • Sleepiness rises by 5 unless the creature is sleepy, in which case it falls by 1.
  • Happiness falls by 5 when hunger is above 25, cleanliness is below 150 or bladder is above 50.

The display labels happiness, hunger and sleepiness. Cleanliness and bladder influence happiness but are not printed by the shown code. The timer starts from zero, so the first update waits roughly a minute; the sketch does not show special handling for long blocking operations or millis() rollover.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
ELEGOO ESP-32 Super Starter Kit with Tutorial Compatible with Arduino IDE
  • Powerful ESP-32 Board: Unlock the world of Internet of Things (IoT) and advanced electronics with the heart of this kit: the ESP-32 board. It features a powerful dual-core processor, integrated Wi-Fi and Bluetooth 4.2, making it perfect for building connected, smart devices that communicate with your phone or the cloud. It's fully compatible with the Arduino IDE for easy programming.
  • Super Starter Kit: This kit contains over 35 different modules and electronic components, including sensors, displays, motors, and input devices. From LEDs and buttons to an OLED screen, servo motor, and keypad, you have everything needed to explore a vast range of projects in one box.
  • Step by Step Online Tutorial: Jump right in with our detailed, beginner-friendly tutorial. Access 30+ projects with complete code, clear circuit diagrams, and step-by-step instructions. Learn the fundamentals of electronics, coding, and how to utilize the ESP-32's unique capabilities without any prior experience.
  • Hands-on Learning for All Skill Levels: Perfect for students, makers, engineers, and hobbyists. Start with basic circuits and coding, then progress to intermediate and advanced IoT applications. Build practical projects like weather stations, smart home controllers, remote-controlled devices, and interactive gadgets. The skills you learn are the foundation for real-world innovation.
  • Quality & Great Support: Elegoo is committed to quality. We provide a clear, detailed tutorial guide, refined code, and a well-organized component kit. All modules are carefully selected for reliability and ease of use. Our dedicated technical support team and active online community are ready to help you succeed in your learning journey.

The enum declares six moods:

HAPPY, SAD, ANGRY, HUNGRY, SLEEPY, DEAD

However, the active image array has only five entries:

const char *images[5] = {
  "/happy.png",
  "/sad.png",
  "/neutral.png",
  "/eatOpen.png",
  "/sleep.png"
};

In the shown mapping, HAPPY uses /happy.png, SAD uses /sad.png, ANGRY uses /neutral.png, HUNGRY uses /eatOpen.png and SLEEPY uses /sleep.png. There is no sixth image for DEAD, and the visible logic never assigns that state. The mismatch is strong evidence that the implementation is simplified or unfinished; it does not prove that death, cleaning or a complete life cycle exists.

Feeding the taco

Only one food item is defined: a taco worth 10 hunger points. Its assets are /taco.png, /tacoOneBite.png, /tacoTwoBite.png and /emptyTaco.png.

  1. The full taco is drawn.
  2. An open-mouth image appears.
  3. The buzzer plays note B2 for 200 milliseconds.
  4. A one-bite taco image is shown.
  5. A closed-mouth image appears.
  6. The buzzer plays C5 for 200 milliseconds.
  7. The open/closed animation repeats for the second bite.
  8. The empty taco is drawn.
  9. Hunger is reduced by 10, without underflowing below zero.

The routine uses blocking delays. Because the loop checks whether the button is held low rather than detecting a press edge, holding the button may call the feeding routine again after each animation completes. That is an inference from the published code, not a reported hardware test.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA Compatible with Arduino IDE (1 PCS)
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Support LWIP protocol, Freertos;ESP32 is a safe, reliable, and scalable to a variety of applications
  • SupportThree Modes: AP, STA, and AP+STA
  • Ultra-Low power consumption, Compatible with Arduino IDE
  • 1PCS 30Pin ESP32 Development Board 2.4GHz WiFi Dual Cores Microcontroller Integrated with Antenna RF Low Noise Amplifiers Filters

Movement and rendering

The creature starts near xPos = 110, yPos = 200, with horizontal velocity -1 and vertical velocity 1. Each loop updates its position and reverses direction near x coordinates 0 and 320 and y coordinates 75 and 405, using the most recently decoded image dimensions to avoid moving outside the apparent display area.

This is autonomous bouncing, not pathfinding or physics simulation. The 320×480-style bounds also sit awkwardly beside the separate WIDTH 200 and HEIGHT 200 definitions. Builders using another resolution, orientation or image size should expect to adjust coordinates and collision limits.

PNG files are decoded line by line through a pngDraw() callback. Decoded lines are converted to RGB565 and pushed to the TFT, with masked or unmasked rendering depending on alpha data. Successful rendering therefore depends on correct LittleFS placement, a compatible PNG decoder, a correctly configured TFT_eSPI display and adequate flash/RAM resources.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Assets the build expects

The sketch references these paths:

  • /background.png
  • /happy.png
  • /sad.png
  • /neutral.png
  • /eatOpen.png
  • /eatClose.png
  • /sleep.png
  • /taco.png
  • /tacoOneBite.png
  • /tacoTwoBite.png
  • /emptyTaco.png

Uploading these files to the ESP32 filesystem is a required build step, not an optional graphics upgrade. Preserve capitalization and leading slashes exactly. A missing or incorrectly named file can prevent decoding or leave the project without a useful fallback image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
HiLetgo ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA for Arduino IDE
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Ultra-Low power consumption, works perfectly with the Arduino IDE
  • Support LWIP protocol, Freertos
  • SupportThree Modes: AP, STA, and AP+STA
  • ESP32 is a safe, reliable, and scalable to a variety of applications

A realistic reproduction plan

  1. Obtain an ESP32 development board, ILI9488 display, three buttons, a buzzer, connecting hardware and a suitable power source.
  2. Install Arduino IDE from the official download page and install ESP32 board support.
  3. Obtain the project code and assets from the author’s repository.
  4. Install the libraries used by the sketch, including PNGdec and TFT_eSPI.
  5. Configure TFT_eSPI for the exact ILI9488 module, SPI pins, chip-select, data/command, reset and rotation settings.
  6. Put the PNG files in the filesystem data directory required by the chosen ESP32/LittleFS upload workflow, then upload the filesystem image.
  7. Compile and upload the sketch.
  8. Test filesystem initialization, display orientation, image loading, button input and buzzer output separately.

The page confirms that repository instructions exist, but it does not provide enough verified detail to prescribe current menu names, library versions or an unchanged 2026 build procedure.

Troubleshooting the first build

Blank, distorted or wrongly oriented display

  • Check the TFT_eSPI setup, controller selection and SPI pins.
  • Verify CS, DC, reset, backlight and power wiring.
  • Confirm voltage compatibility and display rotation.
  • Do not assume every ILI9488 breakout uses the same pinout or interface.

LittleFS initialization failure

Check that the filesystem image was actually uploaded, the partition layout supports it, the board package matches the upload method and the data image is not corrupt. The sketch’s failure path loops forever rather than showing an on-screen diagnostic.

Missing images

Compare every filename, capitalization and leading slash with the paths in the sketch. Confirm that the files went to LittleFS rather than only to the computer or program flash area.

Buttons not responding or repeating

Only the first button is configured in the shown setup(). Confirm pull-up wiring and remember that buttons 2 and 3 are declared but not used by the visible loop. A held first button can plausibly retrigger feeding; debouncing and edge detection are absent.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a finished version would still need

  • Debounced, edge-triggered input for all intended buttons.
  • Non-blocking animation so movement, timers and input continue during eating.
  • A consistent mood model: add a sixth image for DEAD or remove the unused state.
  • Explicit cleaning, bladder and sleep actions if those care variables are meant to be interactive.
  • Persistent state storage with wear-aware writes.
  • Filesystem diagnostics and graceful missing-file fallbacks.
  • Documented board revision, display wiring, power requirements and exact library/core versions.
  • Low-power behavior, battery protection and a practical enclosure for portable use.
  • Separate game logic, rendering and hardware drivers to make further features easier to maintain.

Verdict for prospective builders

Macrogatchi is attractive because one small project combines graphics, flash filesystems, GPIO, sound, timers and simple state-machine logic around an immediately understandable virtual pet. The GPLv3+ listing also makes it a suitable starting point for modification under that license’s terms.

Reproducing the exact build is harder than the concept suggests. The listing omits the precise display module, complete wiring, buzzer details, power system, library versions and current repository status. The code visibly supports one feeding control, five image mappings, timed statistics and bouncing movement—not a finished, fully documented Tamagotchi replacement. Choose it as a learning project or foundation for your own ESP32 pet, and plan to adapt, debug and complete the hardware and software yourself.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.