My old alarm clock is now pretty much completely broken, giving me a lot more motivation to work on this project. It also has a DHT22 mounted on the display, using the last remaining wire on the 10 way ribbon cable connecting it to the controller.
It's now actually in use, and while the "alarm" part doesn't quite work yet, it does report the time, temperature, humidity, date, acts as a bedside lamp and of course it still plays tetris.
I've moved the interface around a bit:
What it displays from top to bottom:
- AM/PM and seconds
- Hour and Minute
- Month (word) and day of month
- Day of week and month(number)
- Humidity (%)
- Temperature (Celcius)
- Apparent Temperature (Celsius)
The wires are also hot-glued in place to survive better.
Knowing the temperature is very useful so that when I get out of bed I know exactly to what extent I will freeze to death.
The DHT library needed some modification, because it takes about half a second to get data back from the DHT, and interrupts need to be disabled. Without being updated regularly, the display just goes completely blank, so I replaced any delays in the library with a custom delay function that ran the update display method until the right amount of time had passed, and that worked suprisingly well.
There is a big problem however. One of the connection seems to come loose overnight, and effects the shift register's data signal causing the display to go haywire. This never happens in the day for the week I've been running it, but very consistently at night, so I presume it's got something to do with the very low temperatures. Pressing on the wire fixes it for the day, but that's clearly not a permanent solution. I'll see if I can resolder the faulty connection, which might be a bit difficult as the connection has hot glue over it.