Configuring a DHT11 sensor to send humidity and temperature weather data
Before you start using your edge device with a DHT11 sensor to send data, you need to follow these steps to configure it:
- Install at least Ubuntu 20.04 LTS on your Raspberry Pi. You can check Chapter 2, K3s Installation and Configuration, and Chapter 5, K3s Homelab for Edge Computing Experiments, for more on this.
- Configure your DHT11 sensor to send data to the Raspberry Pi. For this use case, we are going to use the DHT11 Keyes sensor, which comes from the Keystudio Raspberry Pi 4B Complete RFID Starter kit. This is a common sensor that you can find in other brands. This sensor gets the temperature and humidity. It often comes with three pins, which are G = Ground, V = VCC, and S = Signal. The way to connect is to connect G to a ground pin on the Raspberry and V to a 3V3 pin that powers the sensor with 3 volts. S, for signal, sends information to the Raspberry using a GPIO pin. In this case, you can...