Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.

hpr4075 :: Making a Pomodoro Timer

norrist uses the pomodoro method to keep from getting fired.

<< First, < Previous, , Latest >>

Hosted by norrist on 2024-03-15 is flagged as Clean and is released under a CC-BY-SA license.
circuit python, productivity. 2.

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:19:50


Making a Pomodoro Timer

Slacking Off at work

  • I get distracted Easy
  • My mind drifts if I try to focus on a single task For more than 20-30 Minutes.
  • If I try to fight the urge to just keep working my productivity goes way down.
  • I end up working for a bit, then slacking off for half an hour.
  • I can get more work done If I embrace my limitation and force myself to take a break.

Pomodoro Technique

From Wikipedia

The Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s. It uses a kitchen timer to break work into intervals, typically 25 minutes in length, separated by short breaks. Each interval is known as a Pomodoro, from the Italian word for tomato, after the tomato-shaped kitchen timer Cirillo used as a university student.

The Timer

  • There are plenty of Pomodoro Apps I've tried using an app, but I would often forget.
  • I wanted a physical device that was always on by desk and could grab my attention.
  • I looked for a dedicated physical Pomodoro timer, but only found the kitchen timers
  • I decided to make myself a timer using a Circuit Playground Express

Circuit Playground Express

  • In my past episode about using a Pi pico to type passwords I mentioned I owned a playground express.
  • The playground express is a micro controller with a lot of built ins
    • 2 buttons
    • 10 multi color LED
    • ...
  • Runs circuit python with lots of libraries so it is easy to program.


  • About once every other year I decided to start a project with as much TDD as I can.
  • TDD Basics
    • Write a test BEFORE you write the code
    • Run the test - It will fail
    • Write the simplest code that will pass the test
    • Run the test and make sure it passes
    • Refactor/improve the code if needed.
  • TDD advantages
    • Code is easy to separate into discrete functions
    • Parts of the code can be rewritten without affecting the rest
    • confidence in rewrites

  • Circuit python looks for and runs a file named
  • A lot of the circuit Python code has to be run on the micro controller
  • My Developers workstation does not have the LED's or buttons
  • I split the some code into a separate file based on if it could run in "regular" python.
  • I used TDD as much as possible to test the functions in

  • Functions that require hardware
  • No tests.
  • counts down and changes color of led
  • minutes divided by number of LED

Using the timer

  • Ready
    • Green Light next to button to start work Period
    • Blue Light next to button to start break Period
  • Working
    • White Background
    • Green progress pixels
  • Break
    • White Background
    • Blue progress pixels
  • Button A
    • Start working
  • Button B
    • Start Break


Subscribe to the comments RSS feed.

Comment #1 posted on 2024-03-15 11:13:17 by Trey

Great project

I like the idea of a Pomodoro timer for those of us who are easily distracted and then get so focused on a specific problem we forget to eat. The Raspberry Pi pico reminds me of Arduino. Now I need to research and compare/contrast. I better set a timer. :)
Comment #2 posted on 2024-04-10 00:05:06 by operat0r


You got ADD brah...

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Anti Spam Question: What does the P in HPR stand for ?