Depending on your climate (and HVAC system) dried herbs can go moldy. A big cause of mold is too high of humidity. That's the reasons for all those silica gel packets in items you get. If you store a lot of dried herbs or anything that requires a controlled humidity (and/or temperature) environment, this project can help by monitoring the temperature and humidity in a container and warn you if they go out of the desired range.
In a previous guide: Storage Humidity and Temperature Monitor, we built a simple monitoring project. Specifically, for a small jar. It was really simple, using a Trinket M0 to drive it, a SI7021 breakout to take measurements, and a TPL5111 breakout to manage power. The onboard DotStar and a piezo buzzer were used to indicate status. The code was written in C.
That was built in late 2017. Fast forward (at least it seems fast) to February 2019 (a bit over a year later) and it was time to revisit the design.
The SI7021 is a reliable, robust sensor that the author as used in various projects. All we require is temperature and humidity measurements, and the I2C interface is simple to work with. We'll keep that.
In place of a Trinket M0 we'll use a Feather M4 Express. That's a big jump in power, but this board is reasonably priced and is the author's go-to board for most projects. A huge advantage is the onboard battery charging circuit. This will allow the battery to be charged without having to disconnect and remove it. The Feather also has far more I/O pins than the Trinket. This makes possible the next change.
With the Feather, we can do something better for status indication. It was decided to use an eInk display (which uses SPI and 5 digital I/O lines). The 1.54" square 3-color display was selected. An eInk display is a huge benefit on a device like this. It wakes up approximately every hour to take readings, update the display, and possibly raise an alarm. It's not powered the rest of the time. Using eInk provides a persistent display that remains "on" and informative all the time without requiring power. The downside of eInk is that screen refresh is a slow process. But when you only need to update every hour, that's not a problem.
The previous project used the TPL5110 breakout which directly controls power to the circuit. Since the Feather has an enable pin to control power, the TPL5111 breakout is used in this version.
We keep the piezo buzzer as an out-of-range signal, and add a pushbutton switch to provide input for cancelling the alarm as well as entering and exiting edit mode (we'll talk about that later).
Finally, since the Feather M4 was selected, it was made a project goal to write the software in CircuitPython rather than C.
You'll need your choice of SPST momentary pushbutton switch. The one below is a lovely option for breadboarding.