Inspiration

Traditional period trackers can be easy to ignore. Inspired by the daily attention Tamagotchi pets need, we created MyFlowFriend to encourage menstrual health consciousness.

What it does

To keep your cycle companion, Floppy, healthy and happy, you'll need to check in with yourself every day. By recording at least one symptom (your flow, sleep, mood, or pain), you’re not just tracking your health, you’re taking care of Floppy too. If you miss a single day, Floppy will get sad. After two days of neglect, Floppy will "die." Luckily, you can always bring them back to life just by resuming your tracking. Take care of yourself, and Floppy stays thriving right along with you!

How we built it

We built the hardware companion around an ESP32 microcontroller and a 3.5-inch TFT ILI9488 display. To ensure the physical interface felt highly responsive, we focused heavily on optimizing how the ESP32 communicates with the display controller over SPI. We pushed the SPI clock frequency to its upper limits and utilized the TFT_eSPI library to manage the data transfer. Because pushing high-resolution graphics directly to the screen frame-by-frame causes noticeable flickering, we implemented double-buffering using TFT_eSprite. By allocating a canvas in the ESP32's internal RAM, we were able to render Floppy’s animations entirely in memory before pushing the completed frame over the SPI bus in a single, high-speed burst.

To keep those animations running smoothly while handling background processes, we wrote a non-blocking loop in C that manages touch interrupts and the Wi-Fi stack simultaneously. We also utilized the ESP32's Non-Volatile Storage (NVS) via the Preferences library to save the user's last check-in timestamp locally. This ensures the digital pet's state persists accurately even if the device loses power or is rebooted.

On the software side, we developed a cross-platform mobile application using React Native and TypeScript to serve as the user's primary dashboard for viewing long-term health trends. We chose Firebase as our backend database to bridge the physical hardware and the mobile app. When a user logs symptoms on the physical device, the firmware triggers an asynchronous HTTPS POST request. This request is sent directly via the ESP32's built-in Wi-Fi connection straight to our Firebase backend. This architecture ensures that the hardware and the React Native application stay perfectly in sync, providing a unified, real-time view of the user's data.

To make all of this gathered data actionable, we integrated the Gemini 2.5 Flash API into our backend infrastructure. This integration powers two core features of the app: real-time menstrual cycle predictions based on the user's daily tracked feelings and an interactive menstrual health chatbot. We specifically chose the Gemini 2.5 Flash model because of its exceptional speed and low latency. The specific tasks we needed the AI to perform, like analyzing structured daily logs to predict cycle phases and answering straightforward health questions, did not require prolonged reasoning or deep-thinking computation. By utilizing Flash, we were able to deliver highly accurate, near-instantaneous responses, ensuring the mobile app's AI features felt just as snappy and responsive as interacting with the physical hardware.

Challenges we ran into

Developing MyFlowFriend hit a major snag when we realized our ESP32 was stuck in a "zombie" disconnected state, making data transfers to our database impossible. We found that the ESP32’s WiFi stack doesn't always reset cleanly on its own, so we had to explicitly call WiFi.disconnect(true) and WiFi.mode(WIFI_STA) to force a fresh start in station mode.

Even with the code fixed, the hardware environment threw another curveball. School networks are notoriously difficult for IoT devices because of captive portals and enterprise security, so we pivoted to a mobile hotspot. However, because the ESP32 lacks a 5GHz radio, it couldn't even "see" the hotspot until we toggled "Maximize Compatibility" in the phone settings to force a 2.4GHz broadcast. Once we aligned the frequency and stabilized the connection routine, the HTTPS requests and NTP time-syncing finally worked. It was a solid reminder that in hardware projects, you have to troubleshoot the physical environment just as much as the code.

Accomplishments that we're proud of

One feature we are especially proud of is the data transfer between the ESP32 and the backend of our app via Wi-fi. This is something we think makes MyFlowFriend stand out as a project, as it highlights the strength of our app and firmware development.

What's next for MyFlowFriend

We would like to design and 3D print a portable, ergonomic housing for the hardware of MyFlowFriend. Additionally, we would like to power our tamagotchi with a 3.7V Li-Po (Lithium Polymer) battery and connect a TP4056 charge and protect module to ensure that our tamagotchi is fully portable and rechargeable.

Built With

+ 7 more
Share this project:

Updates