Слайд 2Temperature and humidity sensor
The DHT11 digital sensor is a composite sensor that

provides a calibrated digital signal with temperature and humidity readings.
The sensor includes a resistive humidity measuring component and a negative temperature coefficient (NTC) temperature measuring component, which are connected to a high-performance 8-bit microcontroller.
Слайд 3DHT sensor protocol
The sensor output is a digital signal. Temperature and humidity

are transmitted over one signal wire (S). DHT11 communicates with a host like Arduino using its own protocol.
Слайд 4Creating a device for the dweet.io platform
Link: https://dweet.io/dweet/for/temp?hello=world

Слайд 5Creating a control program
Library for working with the sensor (if it is

not installed, it must be added)
#include
Add the pin number to which the sensor is connected:
DHT dht(4, DHT11);
We start the sensor in the section void setup()
dht.begin();
Reading data from the sensor in the section void loop()
dht.read();
Слайд 6Creating a control program
Displaying temperature readings in Celsius, Kelvin and Fahrenheit;

(section void httpRequest())
client.println(String ("POST /dweet/for/garden?Light=") + String (sensorLight.getLightLux()) + String ("&С=") + String (dht.getTemperatureC()) + String ("&K=") + String (dht.getTemperatureK()) + String ("&F=") + String (dht.getTemperatureF()));
Слайд 7Assignment
Display temperature sensor readings on dweet.io

Слайд 8Freeboard interface
Go to www.freeboard.io
Create account / Login to account
On the www.dweet.io website,

click the Create a custom dashboard button