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 from the manufacturer of 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, not x64). oh well.
i debated adding a buzzer that would sound when the timer was up, but it came down to fitting the components
into the shell i had already printed. in theory there was enough space inside the thing but i was using
(self)shortened dupont wires to connect the screen and the nano because i didn't want to solder directly onto
breakout pins. the wires were bending and because they were so short they were hard to get far enough out of
the way to fit the buzzer and its three wires as well. i then debated sticking an LED out of the other side of
the display, mirroring the button, that would blink as some indicator that the time was up, but i ended up
just putting it together as-is. in retrospect i wish i had put the LED in. i tend not to notice when the time
model.FCStd (freecad model, top and bottom halves are two
separate bodies) - pomodoro_code.ino - uses the arduino
ide's package manager to install the Adafruit SSD1306 library and its dependencies (should include the
Adafruit GFX library).