/lazydoro

automated pomodoro timer

Primary LanguagePythonMIT LicenseMIT

Lazydoro

A Pomodoro timer for lazy developers like me.

lazy- zero

How you use it

Lazydoro uses a Time-of-Flight (ToF) sensor to detect your presence.

When you sit down to work, lazydoro starts a Pomodoro timer.

This runs for 25 minutes; at the end of that time it will beep to tell you that you should take a break. (If you stop early that Pomodoro session will be cancelled.)

When you get up and leave your desk it will start a 5 minute break timer. At the end of your 5 minute break it will beep to tell you to resume work.

The version shown use a Raspberry Pi zero. It uses Pimoroni's Blinkt LED array to show if you are working or resting, and to give feedback about hom much time has expired.

So long as you are happy with Python classes and objects the code is simple and easy to modify. At some stage I may add a ZeroMQ interface that will allow another application to keep track of Pomodoro events.

The hardware and software have gone through several iterations. I plan to write a history page which will describe project's evolution.

Hardware

Bill of Materials

The timer requires the following components. Most links are for the Pimoroni shop, as that's where I got the components I used. Other sources are available.

Hardware Comment URL
Raspberry Pi Zero/Zero W/WH Needs male header buy here
microSD card this has NOOBS installed, but you can overwrite it buy here
Adafruit permaProto bonnet Needs a stacking female header - see below buy here
Stacking header With 11 mm pins buy here
Adafruit VL53L0X ToF sensor Comes with header, needs soldering buy here
Blinkt! Plugs onto the extended header pins buy here
Piezo buzzer Any 3v capable externally driven buzzer Shop around!

Wiring it up

Here's a fritzing diagram which shows the connections and approximate physical layout.

Fritzed

Installing the software

You'll need to know how to set up and connect to a Raspberry Pi zero. If you don't yet, you'll find great advice on the official Raspberry Pi site. For this project you'll need the current (buster) version of Rasbpian. The lite version is fine, though fuller versions are also OK.

Prerequisites

You'll need to install the libraries for RPi.GPIO, Adafruit VL53L0X annd Pimoroni Blinkt! library.

pip3 install RPi.GPIO
pip3 install adafruit-circuitpython-vl53l0x
curl https://get.pimoroni.com/blinkt | bash

Cloning/using this repository

At some point I will make this available on PyPi.

For now, you'll need to clone this repository into the directory of your choice on the Pi zero, change directory, extend your PYTHONPATH, and run the software using Python3.

git clone https://github.com/romilly/lazydoro.git
cd lazydoro/src
export PYTHONAPTH='.'
python3 lazydoro/pi/lazy_zero.py

Take care!

The repository contains up-to-date code for the Raspberry Pi version, but the code for Adafruit feathers needs updating and may result in some changes to the Pi code to increase comatibility. Treat the code as beta quality at best, since the APIs may change!