To provide our dashboard data, we will create a new Python file called SecurityData.py where we will store the SecurityData class. Before we do that, let's build our circuit.
Displaying sensory data on our dashboard
Home security dashboard with a temperature sensor
We will build our first version of the home security dashboard with a DHT11 temperature and humidity sensor, a PIR sensor, and a latching button (or key switch). The following is the Fritzing diagram for our home security dashboard:
The circuit connects as follows:
- GND from DHT11 to GND
- VCC on DHT11 to 5V DC
- Signal on the DHT11 to GPIO pin 19
- GND from PIR sensor to GND
- VCC on PIR sensor to 5V DC
- Signal on PIR sensor to GPIO pin4
- One end of the latching button...