Particle Pomodoro: An Internet-connected Pomodoro Timer

In this blog post, we're going to show you how to build an Internet-connected Pomodoro timer that measures you work and rest cycles and publishes them to Google Sheets for analysis.

Will Hart article author avatarWill HartJune 29, 2016
Particle Pomodoro: An Internet-connected Pomodoro Timer

We’re a big fan of productivity tools here at Particle–at any given moment, our collective backlog is stored between Asana, JIRA, Excel spreadsheets, Wunderlist, gantt charts, and good old fashioned sticky notes.

Unfortunately, none of those tools actually do the work for you–for getting stuff done, we love the Pomodoro technique. Sure, there are plenty of free Pomodoro timers that you can download for your phone and computer, but everyone knows the best cure for a boatload of work is a good side-project, so we decided to build one ourselves (accelerated video below).

In this blog post, we’re going to show you how to assemble a NeoPixel-powered, IoT Pomodoro Timer based on the Particle Internet Button that logs your Pomodoro cycles to Google Sheets for later analysis.

Get an Internet Button >


How it Works

cycle.png

The Pomodoro Technique is simple–to keep yourself alert and productive, work in 25 minute intervals then give yourself a 5 minute break. A 25 minute work period and 5 minute rest period constitutes one “pomodoro”. After four cycles, you should give yourself a longer break of 15-30 minutes. Four cycles of work and rest is called a “cycle” or “set”.

There are both software and hardware timers that you can buy to keep yourself in rhythm, such as Amazon’s “HomeFlav Kitchen Timer Tomato”, or the Pomodoro Time app for Mac.

Neither of these options, though, boast the best of both worlds–the satisfaction of mashing a physical button with the convenience and intelligence of the Cloud. Presenting Particle Pomodoro, a physical Pomodoro timer based on the Particle Internet Button that displays your progress through working sets with pretty NeoPixel LEDs and logs your progress to Google sheets for later self-optimization.

Instructions:

  • Press button 2, 3, or 4 to start the Pomodoro timer. For 25 minutes, the LEDs along the outside edge will glow green. For the 5 minute rest period, they will glow purple.
  • Press button 1 to reset the timer at any time. It will beep to let you know it worked.
  • A pleasant melody will play at the end of the work period and at the end of the rest period

Hardware

To get started, you’ll need just two things:

Any NeoPixel ring or strip is an acceptable stand-in for the Internet Button, but note that you’ll have to substitute the NEOPIXEL library for the INTERNETBUTTON library in the Firmware section of the tutorial below. You may have to make other tweaks to the firmware depending on the geometry and number of pixels in your chain/ring. You’ll also need some sort of button or actuator to trigger the start of the Pomodoro cycle, and a magnetic buzzer if you want to hear pleasant 8-bit tones at the beginning and end of your work and rest cycles.

None of these modifications should be too complicated, though, and we’ve created a thread in our forums to discuss and troubleshoot the Pomodoro example that we’ve built in this post.

Alternate Materials List

  • Particle Photon
  • Neopixel Ring or strip (at least 11 LEDs)
  • USB-Micro cable and 5V power source
  • Two buttons (one for start, one for reset)
  • [Optional] Magnetic buzzer

Firmware

If you haven’t already, you’ll need to setup and claim your Particle device. A full set of instructions for completing setup can be found in the video below, or at http://particle.io/start.

To check that you’ve successfully claimed the Photon to your account, head over to our Web IDE to create and account or login.

login.png

Click on the “Devices” button on the left-hand side of the navigation bar–you should see your Photon in the device list on the left. I see my Photon, Pomodoro, so I’m good to go!

devices.png

Click the star icon on the left of your Pomodoro device in order to target it. Next, copy and paste the firmware below into the application window, give your firmware file a name (Pomodoro-Timer is what we called ours), and click “Save”. Great! You’ve now got the Pomodoro app loaded into the Web IDE, and are almost ready to flash it to your device.

Next, we need to add the INTERNETBUTTON library to our application (or NEOPIXEL library, if you’re using another LED strip). To do that, click on the “Libraries” icon on the left-hand navigation bar, then click on the INTERNETBUTTON library under the “Official Libraries” section. Click the “Include in App” button to add it to your Pomodoro application.

include.png

Select the name of your Pomodoro firmware, and click the Add to This App button. You’ll know that the library was added successfully if you see the following code snippet at the top of your Pomodoro application.

statement.png

The final step is to flash the firmware to your device. Simply press the “Flash” icon at the top left-hand side of the navigation bar. You’ll see your device flash magenta quickly, then flash green and cyan as it reconnects to your network.

Voila! Your Pomodoro Timer is officially online and activated! Press down on any of buttons 2, 3, or 4 to make sure it’s working correctly–you should see the green dots illuminate on the outside edge during the 25 minute work period, followed by three purple dots during your 5 minute rest period.

If you’re using an Internet Button, you’ll hear a pleasant alarm sound at the end of your work and rest periods. Your full Pomodoro should look like the (accelerated) video below.


Integrating with Google Sheets

The last step of the project is to log your productivity to Google Sheets for future analysis and self-optimization. This integration works via IFTTT.com, so you’ll want to start by heading there.

Sign into your IFTTT account or sign up for a new one if you don’t already have an account.

ifttt-login.png

Click on “My Recipes” at the top of the page to start the creation of your Pomodoro logging recipe. Select the following parameters in each of the Recipe steps:

  • Step 1: Select “Particle” from the integrations list
  • Step 2: Select “New event published”
  • Step 3: Enter “Pomo” in the If (Event Name) field, and select your device in the Device Name or ID field.
  • Step 4: Select “Google Drive” from the integrations list. You may have to connect your Google Drive account to IFTTT if you have not done so already.
  • Step 5: Select “Add row to spreadsheet”
  • Step 6: Feel free to leave all the default contents here–we deleted the “Device Name” field in the Formatted row section since we only have one device running the firmware.
  • Step 7: Create the recipe!

If you did everything right, your configuration settings should look like this:

config.png

That’s it! If everything is working correctly, a new Google Sheet will be created in your Drive that logs the start and stop times of your work and rest periods. After starting a new sequence, you should see a new Google Sheet in your Drive titled Pomo that has entries that look something like this:

logging.png

Enjoy! Best wishes from Particle for a productive week 🙂

Comments are not currently available for this post.