Skip to content
manepalliteja37Public

About

๐Ÿฐ A desk Pomodoro timer with a virtual rabbit pet. ESP8266 + 1.8" ST7735 TFT + 3 buttons + buzzer. Focus to earn carrots and Stars, grow your bunny from egg to adult, buy hats and scenes, and manage to-dos from a web page.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

9 Commits

Folders and files

Repository files navigation

๐Ÿฐ Pomogochi

Pomodoro Rabbit: a desk Pomodoro timer with a virtual pet bunny.

It's built on an ESP8266 NodeMCU and a 1.8" ST7735 TFT. Every focus session you finish feeds and grows your rabbit, from an egg to an adult. Skip work, and it gets hungry, tired or sad. It never dies, and a missed day costs only 1 Growth point (it never shrinks a stage).

Firmware version: v1.2-b12 ยท Board: NodeMCU 1.0 (ESP-12E) ยท Arduino core: ESP8266 3.1.2

Egg to Adult Playing with a ball Sleeping

๐Ÿ“š Docs

Guide For
๐Ÿ› ๏ธ Setup guide build it yourself: parts, wiring, flashing, Wi-Fi. No tech skills needed
๐Ÿฃ Pet rules every rule: growth, carrots, care menu, hunger, streak, festival, moods, animations
๐ŸŒ Web page rules every option on the web page, limits, backup and the API

โœจ Features

  • Pomodoro presets: 25 min (โ†’ 5 min break) and 50 min (โ†’ 10 min break) start only from a to-do. 1, 2 (tests) and a 10 min quick focus start straight from Setup, with no break. A finished 10 min focus gives 1 carrot. Every 4th 25/50 focus earns a 15 min long break.
  • Focus display: the hourglass plus a mm:ss countdown. Turn the minutes off on the web page (Show minutes during focus) for an hourglass-only focus.
  • Animated hourglass during focus, with the sand volume drawn correctly.
  • Soothing sounds: a start bell, a soft heartbeat loop during focus (264 Hz, 50 bpm) and a "focus done" chime. Hold MODE to mute the focus sounds (bell + heartbeat); the focus-done, break and pet sounds still play.
  • Virtual rabbit pet with five stages (Egg โ†’ Baby โ†’ Kid โ†’ Teen โ†’ Adult) and Fullness, Love and Energy stats.
  • Moods (b9): every stage has its own Sad, Calm, Happy and Love art, picked from Fullness + Love.
  • Knows the time (b10): good morning at 8, "Lunch time?" at 1 pm, yawns at 10 pm, and sleeps by itself at night (wakes at 8 am).
  • Rewards shop (b12): earn โญ Stars (25 min = 1, 50 min = 2, task done +1, max 8 a day) and buy 6 hats and 4 scenes on the web page. The rabbit wears them on Home.
  • Care menu: Feed, Pet and Play.
  • Streaks: daily streak, best streak, a 7-day streak shield, and milestones at 3, 7, 30 and 100 days.
  • To-do-linked focus: pick a task on the device, focus on it, then answer "Task done?" (OK yes / BACK not yet). Up to 7 open tasks (32 characters each). Done tasks leave the screen and show under Done today on the web page, with the focuses spent on them (๐Ÿ…25ร—2, ๐Ÿ…50). The Pet card shows how many times you fed, petted and played today. Unfinished tasks carry over to the next day.
  • Weekly report card (b8): a This week card on the web page with Sunโ€“Sat focus-minute bars, total ๐Ÿ… and minutes, tasks done, your best day, best task, care counts (fed/petted/played) and โ†‘โ†“ vs the same days last week. Your phone's browser builds it from the saved day sheets, so it costs the device no RAM.
  • History: a log of every finished focus, the last 30 days on the web page, and a JSON day sheet download for each day.
  • Resume after reset or power cut: if the board resets mid-session, the focus or break carries on exactly. After a power cut (or pulling the USB), it carries on from the last snapshot, saved every minute, so at most ~1 min of focus is lost. The time without power never counts.
  • Built-in web page: to-dos, Done today, history, pet stats, streak, settings, Wi-Fi reset and JSON export/import. Open it at http://pomodoro.local or the IP shown on the device.
  • Wi-Fi setup hotspot (Pomodoro-Setup) with a captive portal, so no hard-coded passwords.
  • NTP time (IST) with a saved-time fallback when offline, and an automatic midnight rollover.
  • Idle sleep: after 1 hour with no button press (and no session running) the rabbit falls asleep with a ๐Ÿ’ค animation. The backlight dims and Wi-Fi turns off. Any button wakes it on the Setup screen, and Wi-Fi and the time resync in a few seconds. An open web page keeps it awake.
  • Festival day: mark a date on the web page, and that day has no penalties.
  • Phone alerts (b11): free ntfy app notifications for break over, rabbit hungry (once a day) and an evening summary. Set a topic on the web page; never sent during a focus or break.
  • Crash-safe saves: two checksummed slots on LittleFS, so a power cut never loses your pet. Re-flashing keeps your data too.

๐Ÿ”ง Hardware

Part Notes
ESP8266 NodeMCU v2/v3 4 MB flash
1.8" ST7735 TFT, 128ร—160 "black tab" module, used in portrait
Passive buzzer driven through a BC547 transistor
3 ร— push buttons MODE, OK, BACK
BC547 NPN + 1 kฮฉ base resistor + 1N4148 diode buzzer driver
10 kฮฉ resistor external pull-up for BACK (D0)
USB cable power

Wiring

Signal NodeMCU pin Notes
TFT CS D8
TFT DC (A0) D3
TFT RST RST tied to the NodeMCU RST pin (frees D4 for the backlight)
TFT SDA (MOSI) D7 hardware SPI
TFT SCK D5 hardware SPI
TFT LED (backlight) D4 PWM brightness
TFT VCC 3V3 โš ๏ธ don't short it to LED
Buzzer D6 โ†’ 1 kฮฉ โ†’ BC547 base buzzer on the collector, with a 1N4148 diode across it
MODE button D1 โ†’ GND internal pull-up
OK button D2 โ†’ GND internal pull-up
BACK button D0 โ†’ GND needs an external 10 kฮฉ pull-up to 3V3

D6 is also SPI MISO. The firmware starts the buzzer after the display, so the SPI driver doesn't take over the pin.


๐Ÿ’ป Software setup

  1. Install the Arduino IDE and add the ESP8266 boards URL: https://arduino.esp8266.com/stable/package_esp8266com_index.json
  2. Boards Manager โ†’ install esp8266 by ESP8266 Community (tested with 3.1.2).
  3. Library Manager โ†’ install Adafruit GFX Library and Adafruit ST7735 and ST7789 Library.
  4. Open pomodoro_rabbit_v2/pomodoro_rabbit_v2.ino (the latest firmware, v1.2-b12).
  5. Tools menu:
    • Board: NodeMCU 1.0 (ESP-12E Module)
    • Flash Size: 4MB (FS:2MB OTA:~1019KB)
    • Erase Flash: Only Sketch (keeps your pet, to-dos and Wi-Fi when you update)
  6. Upload, then open the Serial Monitor at 115200 baud if you want logs.

Command-line build:

arduino-cli compile -b esp8266:esp8266:nodemcuv2:eesz=4M2M pomodoro_rabbit_v2

Build size (v1.2-b12): flash 46%, RAM 56%, IRAM 94%.


๐Ÿ“ถ First boot

  1. A 4-page intro walks you through the buttons. OK moves to the next page, BACK goes to the previous one.
  2. If no Wi-Fi is saved, the device opens the Pomodoro-Setup hotspot. Connect your phone, and the setup page pops up (or open http://192.168.4.1). Pick your network and enter the password.
  3. Once online, the time syncs from NTP. Press BACK on Home to see the Wi-Fi name and the web address.

๐ŸŽฎ Controls

Screen MODE OK BACK
Home Setup (presets) Open the care menu Info (Wi-Fi + web address)
Care menu Next item Do it Close (also closes itself after 10 s)
Setup Next preset (1 โ†’ 2 โ†’ 10); after all 3 โ†’ To-do. For a picked task: 25 โ†” 50 only Start focus Home (To-do when a task is picked)
Focus โ€” Pause / resume Press twice to cancel
Break โ€” Pause / resume Press twice to skip
To-do Home Focus on this task (opens Setup) ยท hold = done now Next task
Task done? Yes, done Not yet (2 min = not yet)
Info Home Replay the intro Home
Sleeping Wake โ†’ Setup Wake โ†’ Setup Wake โ†’ Setup
Anywhere Hold = mute / unmute

Buttons are debounced (30 ms). A long press is 1 s, and a double press of BACK must come within a 2 s confirm window.


๐Ÿฃ Pet rules

All numbers live in one file, petrules.h, so they're easy to tune.

Every day starts at Fullness 50, Love 60, Energy 60 at 8 am, so there's something to look after every day.

Growth

Stage Growth points
Egg 0 (hatches after your first completed focus)
Baby 1โ€“9
Kid 10โ€“39
Teen 40โ€“99
Adult 100+
  • Completed 25 min = +1 Growth, 50 min = +2 Growth (max 8 per day).
  • A day with no completed 25/50 focus costs โˆ’1 Growth, but it never drops below the start of the current stage (no un-hatching, no shrinking). The egg and festival days are exempt.

Rewards

Event Effect
Completed 25/50 min focus 25 = +1 carrot, 50 = +2 carrots (max 9 held), Growth, and the streak day marked
Full break taken +20 Energy (breaks are rest time: the rabbit sleeps)
Daily cap carrots and Energy rewards for the first 4 sessions only
Finished 10 min quick focus +1 carrot only (no break, Growth or streak; not part of the 4-a-day limit)

Home moods (b9)

Every stage (Baby, Kid, Teen, Adult) has its own art for each mood.

Fullness + Love Frame Text
either under 20 sad / hungry face "I'm hungry / feed with task"
in between (20โ€“49) calm: looks around (Baby/Kid), signature pose (Teen/Adult) usual messages
both 50 or more happy, cheering arms up "Keep Doing"
both 90 or more love: hugging a heart + a floating heart "Love You Too"

Time of day (b10)

Time Rabbit
8โ€“9 am "Good morning!" + ear twitch, once a day
1 pm "Lunch time?"
10 pm yawns (Baby/Kid) + "Getting late / sleep soon?"
11 pmโ€“5 am "So sleepy...", sleeps after 2 min idle, wakes itself at 8 am

Home only, never during focus or break. A hungry/sad mood wins.

Rewards shop (b12)

Hats and scenes

Stars: 25 min focus = 1, 50 min = 2, task done +1, max 8 a day. Buy and wear items on the web page; one hat and one scene at a time.

Item Stars Needs
๐ŸŽ€ Bow 5 โ€“
๐ŸŒธ Flower 8 โ€“
๐Ÿฅณ Party hat 12 โ€“
๐Ÿงข Cap 15 โ€“
๐ŸŽฉ Top hat 25 โ€“
๐Ÿ‘‘ Crown 40 best streak 30 days
๐ŸŒฑ Grass scene 10 โ€“
๐ŸŒง๏ธ Rain scene 15 โ€“
โœจ Stars scene 25 โ€“
๐Ÿช” Festival lamps scene 40 best streak 100 days

Care menu

Action Effect Limits
Feed 1 carrot โ†’ +10 Fullness, +10 Energy (munch sound) needs a carrot
Pet +10 Love (happy sound) 3 times per day, not at full Love
Play +5 Love, โˆ’10 Energy (play sound) not while Sick or under 20 Energy

Gentle penalties

Event Effect
Cancel in the first 2 min nothing (grace period)
Cancel after 2 min โˆ’5 Love
3 such cancels in a day the rabbit is Worried until midnight
Skip a break no Energy reward, and โˆ’5 Energy
8 am every day fresh start: Fullness 50, Love 60, Energy 60
Daytime (8 amโ€“11 pm) Fullness drops every hour: โˆ’5, then โˆ’4 / โˆ’3 / โˆ’2 after 1 / 2 / 3 rewarded focuses, and none after 4. โˆ’5 Love every 2 h. The egg is exempt
A day with no completed focus streak resets (unless a shield saves it) and โˆ’1 Growth (never below the stage's start)
Fullness at 0 for 2 nights the rabbit is Sick (grey). 2 completed sessions cure it

Festival day ๐Ÿช”

On the web page, tap Tomorrow is a festival (or pick a date). On that day there's no hourly hunger or love drop, no cancel or skip penalty, no streak break and no Growth loss. Focus still counts. The 8 am fresh start (F50 L60 E60) still happens, and the next day carries on normally with your streak intact.

Streak

  • A day counts with at least one completed 25 or 50 min focus.
  • Every 7 streak days earns a shield (max 1), which saves one missed day.
  • Milestones at 3, 7, 30 and 100 days.

๐ŸŒ Web page & API

Open http://pomodoro.local (or the device IP) on the same Wi-Fi.

Endpoint Method Purpose
/ GET the web page
/api/state GET pet, streak, to-dos and settings as JSON
/api/todo POST add / edit / delete / move / tick to-dos
/api/set POST mute, heartbeat sound, backlight, break auto-start, pet name, replay intro, festival day (k=fest&v=YYYYMMDD, t = tomorrow, 0 = clear)
/api/wifi POST forget Wi-Fi and reopen the setup hotspot
/api/export GET backup as JSON (the Wi-Fi password and ntfy topic are never exported)
/api/import POST restore a backup
/api/hist GET today + the last 30 days (sessions, minutes, done, open)
/api/day?d=YYYYMMDD GET one day sheet as a JSON download (today is built live). From b8 it includes care (fed/petted/played)

๐Ÿ“ Project structure

Pomogochi/
โ”œโ”€โ”€ README.md                    this file
โ”œโ”€โ”€ LICENSE                      MIT (code); the rabbit art keeps its own MIT notice
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ pomodoro_hardware.md         planning notes: parts and pins
โ”œโ”€โ”€ software_requiremnets_flow.md    planning notes: screens and flow
โ”œโ”€โ”€ build_guide_v1.md            the stage-by-stage build plan (Stages 0-9)
โ”œโ”€โ”€ build_guide_v2.md            v1.1 / v1.2 feature plan
โ”‚
โ”œโ”€โ”€ pomodoro_rabbit_v2/          โญ LATEST FIRMWARE (v1.2-b12): flash this one
โ”‚
โ”œโ”€โ”€ docs/                        setup guide, pet rules, web page rules
โ”‚   โ”œโ”€โ”€ setup.md
โ”‚   โ”œโ”€โ”€ petrules.md
โ”‚   โ”œโ”€โ”€ webrules.md
โ”‚   โ””โ”€โ”€ media/                   GIFs, wiring diagram and shop preview used by the docs
โ”‚
โ”œโ”€โ”€ tools/                       Python generators for the sprite headers and doc media
โ”‚   โ”œโ”€โ”€ gen_frames.py            โ†’ pet_frames.h
โ”‚   โ”œโ”€โ”€ gen_mood_frames.py       โ†’ mood_frames.h
โ”‚   โ”œโ”€โ”€ gen_shop_art.py          โ†’ shop_art.h (art in shop_art_src.py)
โ”‚   โ”œโ”€โ”€ make_doc_media.py        โ†’ docs/media/*.gif
โ”‚   โ”œโ”€โ”€ make_wiring.py           โ†’ docs/media/wiring.png
โ”‚   โ””โ”€โ”€ mood_art/                source PNGs for the mood frames
โ”‚
โ”œโ”€โ”€ images/                      preview sheets: frames, moods, shop
โ”‚
โ”œโ”€โ”€ Build_from_scratch/          the step-by-step test sketches, in build order
โ”‚   โ”œโ”€โ”€ tft_screen_test/         display wiring test
โ”‚   โ”œโ”€โ”€ simple_timer/            first timer
โ”‚   โ”œโ”€โ”€ hour_glass_timer/        hourglass animation
โ”‚   โ”œโ”€โ”€ stage3_bitmaps/ ยท stage3b_fastdraw/   rabbit sprites + fast drawing
โ”‚   โ”œโ”€โ”€ stage4_buttons/          3-button input layer
โ”‚   โ”œโ”€โ”€ stage5_buzzer/ ยท stage5a/5b/5c_*      chimes and focus sounds
โ”‚   โ”œโ”€โ”€ stage6a_storage/ ยท stage6b_wifi_time/ crash-safe saves, Wi-Fi, NTP
โ”‚   โ”œโ”€โ”€ stage7_web/              web page + API
โ”‚   โ””โ”€โ”€ stage8a_screens/ ยท stage8b_pet/ ยท stage8c_care/   screens, pet rules, care menu
โ”‚
โ””โ”€โ”€ archive/                     older firmware builds, kept for history
    โ””โ”€โ”€ pomodoro_rabbit_v1 โ€ฆ v1.10/

Firmware files (pomodoro_rabbit_v2/)

pomodoro_rabbit_v2/
โ”œโ”€โ”€ pomodoro_rabbit_v2.ino   main loop, serial status
โ”œโ”€โ”€ storage.h                crash-safe A/B save files (LittleFS + CRC32)
โ”œโ”€โ”€ netsetup.h               Wi-Fi join + captive setup hotspot
โ”œโ”€โ”€ clock.h                  NTP time (IST) + saved fallback
โ”œโ”€โ”€ buzzer.h                 chimes + focus heartbeat (non-blocking)
โ”œโ”€โ”€ input.h                  3-button layer (debounce, long, double press)
โ”œโ”€โ”€ appdata.h                settings, pet, to-dos, dirty-flag saving
โ”œโ”€โ”€ webui.h                  web page + JSON API
โ”œโ”€โ”€ history.h                day log, day sheets, 30-day history, carry-over
โ”œโ”€โ”€ gfx.h                    display helpers, top bar, sprites
โ”œโ”€โ”€ session.h                focus / break engine, presets, cycle dots
โ”œโ”€โ”€ hourglass.h              hourglass animation
โ”œโ”€โ”€ petrules.h               all pet rules and numbers
โ”œโ”€โ”€ screens.h                every screen, button map, care menu
โ”œโ”€โ”€ ntfy.h                   b11 phone alerts through ntfy.sh
โ”œโ”€โ”€ pet_frames.h             1-bit rabbit sprites (generated)
โ”œโ”€โ”€ mood_frames.h            b9 mood sprites: sad / calm / happy / love per stage (generated)
โ”œโ”€โ”€ shop_art.h               b12 hats, scenes and hat positions (generated)
โ”œโ”€โ”€ README.md                copy of this README
โ””โ”€โ”€ LICENSE_bunny_art.txt    MIT notice for the rabbit art

tools/gen_frames.py regenerates pet_frames.h from the PNG art (the argument is the threshold, default 190). tools/gen_shop_art.py regenerates shop_art.h (art in tools/shop_art_src.py). tools/gen_mood_frames.py regenerates mood_frames.h (the new mood art is drawn in the same style as the original MIT bunny pack).


๐Ÿฉบ Serial monitor

At 115200 baud, type ? for a status report: version, uptime, last reset reason, lowest free heap, time, Wi-Fi, pet stats, streak and to-dos. Type h to preview the time-of-day reactions (real clock โ†’ 8 โ†’ 13 โ†’ 22 โ†’ 23 โ†’ real), and a to send a test phone alert.

For testing, set #define TEST_KEYS 1 at the top of the .ino to enable extra keys: fast mode (1 min = 1 s), "pretend a night passed", add a carrot, reset the pet, and more.


๐Ÿ™ Credits

  • Rabbit artwork from limengdu/reTerminal_Sticky_Bunny, MIT License, ยฉ 2026 limengdu. See pomodoro_rabbit_v2/LICENSE_bunny_art.txt.
  • Project code: MIT License, see LICENSE.
  • Built with the Adafruit GFX and ST7735 libraries and the ESP8266 Arduino core.

Made by Teja Manepalli ๐Ÿ‡ฎ๐Ÿ‡ณ

About

๐Ÿฐ A desk Pomodoro timer with a virtual rabbit pet. ESP8266 + 1.8" ST7735 TFT + 3 buttons + buzzer. Focus to earn carrots and Stars, grow your bunny from egg to adult, buy hats and scenes, and manage to-dos from a web page.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages