Focus 25 minutes. Get launched a snack.
A Pomodoro app gives you a checkmark when you finish a focus block. A checkmark is not a snack. You cannot eat a checkmark, you cannot catch a checkmark, and after the third checkmark of the day you stop caring about checkmarks entirely. So this is a Pomodoro timer with a physical ending. Finish a real 25-minute block and a servo catapult launches a biscuit at a tray on your desk. Quit early and the timer resets. No snack, no partial credit, no “well, 24 minutes is basically 25”. Every number in this post comes from the simulated demo, run on a laptop with no Pi, no servo and no biscuits. No snack was launched. One biscuit was, in the simulation, dropped on the floor.
Why a Checkmark Is Not a Snack
Pomodoro timers fail the same way most productivity apps fail: the reward is abstract, so skipping it costs nothing. You quit at 14 minutes, the app says “session ended early”, and you feel mildly guilty for about four seconds. Then you open something else. The timer has no leverage. It cannot take anything away from you, because it never gave you anything.
A catapult has leverage. The snack is real, it is sitting in the catapult, and the only way it moves is 25 continuous minutes of focus. Quitting at 24 minutes — one minute short — gets you exactly what quitting at 1 minute gets you: nothing, and a timer back at zero. That is harsh, and that is the point. The timer does not negotiate. It does not round up. It does not care that you were nearly there. Nearly there is not there.
Underneath the joke it is the same engineering as a dozen real devices: a timer, a threshold, a single action on completion, and a sensor that scores the result. The sensor here is a camera over the tray, running YOLO, checking where the snack actually landed. The catapult does not get to claim a successful launch just because the servo moved. The snack has to be in the tray.
What You Need
You need a Raspberry Pi, any model that runs Python 3; a low-power servo and a small catapult arm; a webcam above the tray for the catch check; a tray, which is the catch zone; light snacks, a biscuit or a grape; and a power supply for the Pi and a separate one for the servo, because the Pi’s 5 V pin is not a servo power supply.
The code uses only the Python standard library for the demo, so there is nothing to install to run it. OpenCV and YOLO are only needed for the live catch check on the Pi. If you do not have a Pi yet, you can still build this on a laptop. The simulated mode runs 4 scripted sessions on a compressed clock — 1 demo second stands for 1 focus minute, so 88 focus minutes take 88 demo-seconds — and writes the same session log a real catapult would write. That is how I tested it, and where every number in this post comes from.
Light snacks only, low-power servo, launch away from faces and screens. The catch zone is a tray, not a person. Nothing heavy, nothing that stains, nothing aimed at anyone.
How It Works
A timer, a servo, and a camera.
The focus timer counts 25 continuous minutes. Tick it once a minute and it counts up; quit early and it resets to zero. There is no pause button in this build, because a pause button is a quit button with better branding. If you walk away, the session ends, the timer resets, and the snack stays in the catapult. Session 4 in the demo quit at 24 minutes — one minute short of a biscuit — and got nothing. That is not a bug. That is the whole device.
Then the launch. A completed block fires the catapult exactly once. The servo sweeps from its rest angle of 10 degrees to the launch angle of 120 degrees, a swing of 110 degrees, holds for 1 second, and returns. One launch, one snack, per completed block. The servo angle is a setting in config.py, not a result: changing it changes where the snack lands, and the demo would have to be re-run to say where.
Then the catch check. A camera above the tray watches where the snack lands, and YOLO returns its position in centimetres from the catapult. The tray is centred at 50 cm and 20 cm wide, so 40 to 60 cm is caught and anything outside that is missed. The check looks at the landing position and nothing else — not the servo angle, not the timer, not how focused you looked. A servo that moved perfectly and a biscuit on the floor is a miss. That distinction matters, because it is the difference between a device that reports what it did and a device that reports what happened.

The Maths
Here it is, with the real numbers from the simulated demo, and nothing else. The demo ran 4 sessions: 2 completed, 2 quit early.
- Session 1: 25 minutes, completed. Servo to 120 degrees, biscuit launched, landed at 48 cm. The tray spans 40 to 60 cm, so 48 cm is inside it — 2 cm left of the centre. Caught.
- Session 2: 25 minutes, completed. Servo to 120 degrees, biscuit launched, landed at 71 cm. The tray ends at 60 cm, so 71 cm is 11 cm past the edge. Missed, on the floor.
- Session 3: quit at 14 minutes. Timer reset to zero, no launch, no snack.
- Session 4: quit at 24 minutes. One minute short. Timer reset to zero, no launch, no snack.
Add the minutes up. Focus minutes logged: 25 + 25 + 14 + 24 = 88 minutes. Focus minutes earned: 25 + 25 = 50 minutes, because only minutes inside completed blocks earn a snack. The other 38 minutes — 14 + 24 — are logged, and they earned nothing. That split is the honest number. Reporting 88 minutes as “focus earned” would be a lie with good arithmetic: the minutes happened, but 38 of them ended in quitting, and quitting pays nothing.
The launch maths is a count. Snacks launched: 2, one per completed block. Caught: 1 out of 2, or 50 percent. Missed: 1 out of 2, also 50 percent. The demo clock ran 88 demo-seconds, because the compressed clock turns 88 focus minutes into 88 seconds. On a real desk, without compression, those same 4 sessions would take 88 real minutes — and the two quit sessions would still have cost you 38 real minutes for nothing, which is exactly why the timer resets.

Build It
Build the catapult first, with the Pi off. Mount the servo and the arm so it throws towards the tray and away from your face, your screen and anyone else’s desk. Put the tray 40 to 60 cm from the catapult, on a flat surface, and put the webcam above it looking down at the tray. Power the servo separately. Load one biscuit. Keep a towel under the tray for the first test, because the first launch is never the one you calibrated for.
The folder holds catapult.py (focus timer, launch and catch check), catch_check.py (landing position to caught or missed), simulate.py (the scripted 4-session demo), config.py (focus block, servo angles, tray size and snack), requirements.txt (stdlib only for the demo; OpenCV and YOLO only for live mode), README.md, and sample_data/, with the demo session log in JSON and CSV. Three Python files, each doing one job: settings, the brain, and the demo.
The settings live in config.py:
FOCUS_MINUTES = 25
SERVO_REST_DEG = 10
SERVO_LAUNCH_DEG = 120
LAUNCH_HOLD_SECONDS = 1.0
TRAY_CENTER_CM = 50.0
TRAY_HALF_WIDTH_CM = 10.0
SNACK = "biscuit"The timer and the launch live in catapult.py. The timer counts up one minute at a time, completes at 25, and resets to zero if you quit:
class FocusTimer:
def __init__(self):
self.elapsed_minutes = 0
self.completed = False
self.quit = False
def tick(self):
if self.completed or self.quit:
return False
self.elapsed_minutes += 1
if self.elapsed_minutes >= config.FOCUS_MINUTES:
self.completed = True
return True
return False
def quit_early(self):
self.quit = True
self.elapsed_minutes = 0The catch check is one function, and it only looks at where the snack landed:
def check_catch(landing_x_cm):
if landing_x_cm is None:
return None
if abs(landing_x_cm - config.TRAY_CENTER_CM) <= config.TRAY_HALF_WIDTH_CM:
return "caught"
return "missed"The demo in simulate.py is the scripted sequence, 4 sessions with a known ending and a known landing each:
SCRIPTED_SESSIONS = [
(1, 25, "completed", 48.0), # snack in the tray
(2, 25, "completed", 71.0), # snack on the floor
(3, 14, "quit", None), # quit early, timer resets
(4, 24, "quit", None), # quit one minute short, still resets
]Run the demo on any laptop, with no Pi and no hardware:
python3 simulate.pyThere is nothing to install first: requirements.txt is commented out on purpose for the demo, and OpenCV and YOLO are only needed for the live catch check. To run it for real, copy the folder to the Pi, install the requirements, point the webcam at the tray, load a biscuit, and run the live mode. Press Ctrl+C to stop it.


Expected Outcome
Here is the actual output of the simulated demo, from python3 simulate.py:
Snack Catapult -- simulated demo
Focus block: 25 min | Compressed clock: 1 demo-s = 1 focus-min
Tray: 40-60 cm from catapult | Servo: 10 deg rest, 120 deg launch
Simulating 4 scripted sessions...
Session 1: 25 min complete -- [LAUNCH] servo to 120 deg, biscuit landed at 48 cm -- caught
Session 2: 25 min complete -- [LAUNCH] servo to 120 deg, biscuit landed at 71 cm -- missed
Session 3: quit at 14 min -- timer reset, no launch
Session 4: quit at 24 min -- timer reset, no launch
--- Session log ---
Sessions: 4 (2 completed, 2 quit early)
Focus minutes logged: 88
Focus minutes earned (completed blocks only): 50
Snacks launched: 2
Caught in tray: 1 | Missed: 1
Demo clock: 88 demo-seconds (= 88 focus-minutes, compressed)
Session log written to logs/session-log.json and logs/session-log.csv
Demo finished in 0.00 seconds (wall clock)If your run prints the same 4, 2, 2, 88, 50, 2, 1 and 1, yours works. The session log has 4 entries, one per session: sessions 1 and 2 launched, sessions 3 and 4 show a timer of 0 minutes after quitting, because the timer reset. On a real Pi, the outcome is the same shape with messier numbers. If it launches once per completed block and never on a quit, it works. If it launches when you quit at 24 minutes, your timer is rounding up, and a timer that rounds up is a timer that lies. If it never launches, check the block length first: sit through the full 25, then check the servo moved.
What Broke
Two things broke while I was building this. The first was a counting bug, and it is why the demo reports two different minute totals instead of one. My first summary added every focused minute together and called the total “focus minutes earned”: 88 minutes, which sounds impressive and is wrong. Thirty-eight of those minutes ended in quitting — 14 in session 3, 24 in session 4 — and quitting earns nothing. A total that mixes earned minutes with wasted minutes is a vanity number. So the demo now keeps two counters: minutes logged, which is 88, and minutes earned, which is 50, and only minutes inside completed blocks go into the second one. If a number in this post says “earned”, it means a block finished.
The second break was a design mistake, and it is the reason the catch check takes a landing position instead of a servo angle. My first version scored the launch from the servo: if the servo reached 120 degrees, the launch counted as a success. That felt tidy, until I looked at session 2 and realised the servo had done everything right and the biscuit was still on the floor at 71 cm. A check that only confirms the machine moved is a self-congratulation, not a measurement. So the catch check now takes the landing position from the camera, and the tray — 40 to 60 cm — decides. Session 1 is caught because the biscuit is at 48 cm. Session 2 is missed because it is at 71 cm. The servo angle is a setting. The landing is the result.
One honest limitation, from the same angle Day 27 has: the demo scripts the landing positions, so it cannot tell you whether your real catapult throws straight. A servo that is slightly loose, a biscuit that is slightly heavier, a tray that is slightly further away, and your 48 cm becomes 71 cm. That is a calibration problem, not a code problem, and the fix is to run the live mode, watch where the snacks actually land, and move the tray or change the launch angle until the caught rate climbs. I did not add auto-calibration here, because the demo is about the timer and the rule, not about tuning a catapult, and a reader who copies the launch angle from config.py should know it is a starting point, not a guarantee.
Download the Full Project
The full project is in the download below: catapult.py, catch_check.py, simulate.py, config.py, requirements.txt, README.md, and the sample session log in JSON and CSV, from the 4-session simulated demo. Unzip it, run python3 simulate.py, and check your output matches the one above: 4 sessions, 2 completed, 2 quit early, 88 focus minutes logged, 50 earned, 2 snacks launched, 1 caught, 1 missed.
Premium Download
Get the complete project code
Then change one number in config.py and run it again. Set the focus block to 5 minutes and watch the snacks come faster. Set the tray half-width to 5 cm and watch session 1 miss too. Your desk will still be judging your focus, just on your terms.
