The Angry Humidor

Just for fun I added an Arduino to a humidor to monitor the temperature and humidity.

This humidor is built on the newest Arduino board, the MKR1000. This board is basically an Arduino Zero with a built in WiFi shield. I added a Adafruit-htu21d-f temperature and humidity sensor and an LED. The LED is coded to flash codes for errors and readings. The Arduino connects to the WPA2 wireless network with the WIFI101 library. I coded the Arduino to take a temperature and humidity reading every hour then it sends the data over HTTPS POST to a Web API service. The Web API calls a stored procedure in AZURE to write the data to the database. This website pulls the data using MVC. A data access object is created and passed to the model, the model populates the view.

Twitter Account

If, for some strange reason, you take the time to Wifi enable a humidor you should create a twitter acount for it. It is the geeky thing to do. The Web API will randomly select 1 out of 100 temperature and humidity readings to send to the twitter API. This method will create a randomly generated disgruntaled tweet that includes the temperature and humidity.

Humidor readings

Reading Date/Time Temperature Humidity Humidor
12/16/2019 8:01:34 AM 67.71 67.11 BeachHouse
12/16/2019 8:01:02 AM 65.95 68.95 CS50
12/16/2019 7:01:34 AM 67.27 66.99 BeachHouse
12/16/2019 7:01:03 AM 65.43 71.29 CS50
12/16/2019 6:01:34 AM 67.05 67.99 BeachHouse
12/16/2019 6:01:03 AM 65.12 70.01 CS50
12/16/2019 5:01:34 AM 66.94 67.28 BeachHouse
12/16/2019 5:01:03 AM 64.91 69.58 CS50
12/16/2019 4:01:34 AM 67.36 71.80 BeachHouse
12/16/2019 4:01:02 AM 65.25 70.64 CS50
12/16/2019 3:01:34 AM 67.69 67.19 BeachHouse
12/16/2019 3:01:14 AM 65.66 69.84 CS50
12/16/2019 2:01:34 AM 68.10 67.31 BeachHouse
12/16/2019 2:01:03 AM 65.98 72.90 CS50
12/16/2019 1:01:34 AM 68.42 67.12 BeachHouse
12/16/2019 1:01:02 AM 66.44 69.04 CS50
12/15/2019 11:01:33 PM 69.50 68.29 BeachHouse
12/15/2019 11:01:05 PM 67.37 70.18 CS50
12/15/2019 10:01:33 PM 70.06 68.47 BeachHouse
12/15/2019 10:01:05 PM 67.64 69.17 CS50
12/15/2019 9:01:33 PM 69.81 68.31 BeachHouse
12/15/2019 9:01:05 PM 67.60 71.59 CS50
12/15/2019 8:01:33 PM 69.54 68.18 BeachHouse
12/15/2019 8:01:04 PM 67.66 69.46 CS50
12/15/2019 7:01:33 PM 69.43 68.96 BeachHouse
12/15/2019 7:01:05 PM 67.63 69.60 CS50
12/15/2019 6:01:33 PM 69.20 68.08 BeachHouse
12/15/2019 6:01:04 PM 67.41 69.43 CS50
12/15/2019 5:01:33 PM 69.29 68.41 BeachHouse
12/15/2019 5:01:04 PM 67.53 72.40 CS50