projects : pomodoro timer
pomodoro timer
i figured out that i like studying with the pomodoro technique (20 or so minutes on, 5 or so minutes
off of work), but i have had gripes with all the computer-based timer programs i have used. honestly, i don't
want to have more to do with my computer when studying than i absolutely have to, so a program is just really
annoying to keep track of. i was looking at parts around my room and realized how easy it would be to put
together a physical timer box with a little screen and a one-button interface to keep my eyes off a monitor. i
ended up using an elegoo arduino nano clone, ssd1306 128x64 0.96in oled display and a button i had laying
around. i made a 3d model of a housing and printed it. it's rudimentary, as my CAD skills are pretty
much in infancy, but it gets the job done. while it was printing, i wrote some code for the timer. i'm rather
happy with how simple it ended up being, plus it all worked first try.
that is, except for the i2c address of the screen. i was losing my mind because the datasheet for my screen says the address is 0x27, the actual physical device has 0xA7 printed on it, but it turns out the actual address is 0x3C. i feel like i must have some fundamental misunderstanding of how i2c works because example code for the screen uses 0x27 perfectly fine, while also most online documentation of the adafruit ssd1306 library tells you to use 0x3C as the address, which ended up being correct (despite the adafruit sample code saying to use 0x3C for 128x32 displays). oh well.
also, the arduino ide is such a failure of a program. it is a blatant visual ripoff of vs code with next to no functionality. it has everything that the old ide had but with a less cool startup screen. when i saw they updated the ide, i was hoping that it would improve literally anything about the old version. there is no discernable positive difference. the syntax highlighting is god awful, color scheme is painful and the serial console/plotter interface is demonstrably worse than the old version. i was also reminded that writing code without vim keybindings is hellish. the arrow keys are so far out of the way and everything nice is gone. i would have used avrdude and foregone the god forsaken 'ide', but the ide has a library manager and i just didn't care enough to figure out how to compile the libraires through avr-gcc. that will be a learning experience for a future project.
picture:
source files: model.FCStd (freecad model) - pomodoro_code.ino - uses the arduino ide's package manager to install the Adafruit SSD1306 library and its dependencies.
that is, except for the i2c address of the screen. i was losing my mind because the datasheet for my screen says the address is 0x27, the actual physical device has 0xA7 printed on it, but it turns out the actual address is 0x3C. i feel like i must have some fundamental misunderstanding of how i2c works because example code for the screen uses 0x27 perfectly fine, while also most online documentation of the adafruit ssd1306 library tells you to use 0x3C as the address, which ended up being correct (despite the adafruit sample code saying to use 0x3C for 128x32 displays). oh well.
also, the arduino ide is such a failure of a program. it is a blatant visual ripoff of vs code with next to no functionality. it has everything that the old ide had but with a less cool startup screen. when i saw they updated the ide, i was hoping that it would improve literally anything about the old version. there is no discernable positive difference. the syntax highlighting is god awful, color scheme is painful and the serial console/plotter interface is demonstrably worse than the old version. i was also reminded that writing code without vim keybindings is hellish. the arrow keys are so far out of the way and everything nice is gone. i would have used avrdude and foregone the god forsaken 'ide', but the ide has a library manager and i just didn't care enough to figure out how to compile the libraires through avr-gcc. that will be a learning experience for a future project.
picture:

source files: model.FCStd (freecad model) - pomodoro_code.ino - uses the arduino ide's package manager to install the Adafruit SSD1306 library and its dependencies.
parts list:
- elegoo arduino nano clone - works just like the nano, way cheaper, had a few i wasn't using so i didn't mind sacrificing one
- 0.96in 128x64 oled screen - uses i2c, the exact screen i used was this one because it was sitting in my drawer but any of the million ssd1306 screens out there will do exactly the same thing and probably have an identical footprint. this one doesn't have mounting holes, which would have made it a little easier to secure the screen inside, but i just used some superglue to hold it in place because i am too lazy to design something better.
- generic momentary button - the button i used is pretty generic, it's nice because it has a mounting nut which meant i didn't have to glue the button on and could just screw it in instead. this is one of a thousand places to buy these exact buttons, but literally any button will work.