Close

Assumptions bad

A project log for Darktimer

A countdown timer for use when you can't have any light. Multiple sequential timers stored in EEPROM, with coded beeps to indicate events.

Dangerpants LabsDangerpants Labs 08/23/2015 at 00:110 Comments

I started out this project assuming I would be using interrupts to register button presses. A previous project had done that, and it had worked well, but I didn't consider it very hard in my coding. That was a detail for hardware implementation.

This weekend, I actually did the research on it, and realized that using interrupts like that will not work the way I want. So, although I thought I was close to done, I'm now having to rejigger the way all the button interactions were tested (and there are a *lot* of tests around button interaction). Fortunately, I was clever enough to make a function to handle button presses for the majority of uses, so it will be a matter of updating that one function rather than touching a zillion tests.

It's a bit silly having to go back and rework things, but this is pretty much the heart of iterative design: do it the way you think will work, then when you discover it won't, go back and rework things until it works the way it has to. Try to keep yourself from having to do too much of an about-face with changes like this, and design in such a way that the rework will be as minimally awful as possible.

I was able to get the LCD hooked up properly last night, and got the display I was expecting, after some trouble with a doubled-up pin. No button handling meant I couldn't see anything happening, but it was pretty cool to see the opening screen looking like it should.

Discussions