I love my Baratza coffee grinder. Baratza makes terrific products that are affordable and designed to last, but are also user-repairable when they eventually break down. (I'm not affiliated with or sponsored by Baratza in any way. I just genuinely love my grinder. Though if Baratza wanted to send me stuff to try out ...) Twelve years ago I bought their Virtuoso grinder for my home kitchen and I've used it almost every day since then. At home I make Aeropress or Chemex coffee so I don't need espresso-grade grinding and the Virtuoso is perfect for me. The only thing I didn't like about it was the original timer. It came with a windup mechanical timer that you could turn to run the grinder for an adjustable length of time. But being a mechanical windup device, it was not precise or consistent. I drew a line on the side to mark the optimal time for me, but results varied significantly so eventually I replaced that mechanical timer with my own electronic timer using a Raspberry Pi Pico. I measured the time for 12g of coffee and hard-coded that single duration value. And when beans were harder or softer and ground at different rates, oh well, close enough. I could adjust grind size a little bit to control my output quantity. And that worked okay for a long time.
Recently, my Virtuoso finally broke. The main drive gear is cast plastic and it finally shattered from fatigue. A replacement gear was like $6 on the Baratza website. However, after I put my grinder back together I pushed the timer button on the side ... and nothing happened. I don't know what I did, but my Raspberry Pi Pico timer wasn't working anymore. I took it apart and stared at it for a minute and didn't see anything obviously wrong, but instead of investigating and repairing I decided it would be easier to just build a new one. I switched from Raspberry Pi Picos to ESP32s for all my hobby projects several years ago and I don't even have the setup to flash a new Pico anymore.
So what should my ESP32 solution look like? I figured I should add in the user-adjustable capability that the previous timer lacked. Should I add in a 7-segment or tiny OLED display and buttons or dial to adjust time? But then I thought ... why install buttons and a display that I only use a few times a year? Hadn't I already solved this problem on other hobby projects? I can connect my ESP32 to my home wifi and spin up a webserver that lets me tune whatever I like. All the functionality I need, no hardware additions required, no cutting holes in the coffee grinder body to hold new screens or buttons, no new code or libraries or tools to learn. Perfect for my use case.
So I did that. I wrote a simple button/timer project and then added in a simple webserver UI to let me change the timer duration. Anytime I update the time, it's saved to NVM as the new default value. It works beautifully. Most days I just push the button to grind for the previously-set time, and then every once in a while (usually when I buy a new/different type of beans) I can update the timer from my laptop or phone in 10-20 seconds. It feels quite silly to have so may iot devices in my house now ... but it works great.