I wanted to program something that I would actually use, so I built this. I often used the pomodoro technique whenever I studied and used a website called tomato timer, but the problem that I had was since it was web based, I would often get distracted and go on a different website instead of studying. Having my desktop based program solves that problem for me.
- Countdown timer
- Different modes (Study and Break)
- Notification sound goes off when the timer is done
- Settings to change the amount of time you want per mode
- Setting to toggle the notification sound
what i learned
- More Python practice.
- State machines used to design the timer logic and the different modes.
- How to add sound through PyQt5.
- Adding images to PyQt5 to make program look better.
- Asynchronously run a portion of the program while being able to respond to user input.
- A little more complex use of signals in order to base the program’s behavior on the GUI’s info rather than initializing more variables which would complicate things further.
I’ve made a pomodoro timer before but the one I made was based on an Arduino circuit and wasn’t as complex as this one because this one allowed the option to change the amount of time you want per mode and also had a reset button and a notification sound when the timer ends. A problem I had in my other PyQt5 programs was that whenever the program was running, it wouldn’t be able to listen to user input signlas because I used python’s time library that would completely halt the program. Instead, for this program I used PyQt5’s QTime module that would allow the program to asynchronously run the timer while also being able to listen for user input such as when the user wants to pause, reset and ect. Originally, I thought the program was going to be straightforward, but there were a lot of subtle problems that occured when translating my logic into a GUI compatible format.