Blog


Building a cloud-connected temperature and humidity sensor
Building a cloud-connected temperature and humidity sensor

Now that you can connect your Raspberry Pi Zero to campus Wifi, what to do with it? How about a simple cloud-connected temperature and humidity sensor? For this project, I combined a Raspberry Pi Zero W with a DHT22 sensor. The DHT22 is a cheap, widely available sensor that can measure temperature with an accuracy of ~0.5 °C and humidity with an accuracy of ~5%. You can read about the DHT22 in wonderful detail here.

Connecting a headless Raspberry Pi to University of Arizona wifi (and fixing time)
Connecting a headless Raspberry Pi to University of Arizona wifi (and fixing time)

I have a lot of Raspberry Pi Zeros. Most of them are spread across various basement growth chambers at the University of Arizona. They run sensors that monitor heat and humidity inside the chambers and upload the data to the cloud for visualization in a Shiny app. To keep costs down, I run the Pi’s headless, meaning no monitor, mouse, or keyboard. This works fine at home, where I can easily add the network name and password to the /etc/wpa_supplicant/wpa_supplicant.conf file by directly editing it on the SD card before I plug it into the Pi, as described in the Raspberry Pi docs: