The previous period of development of telemedicine system (Dr.cloud) has used over temperature and humidity sensor, but at that time considering the difficulty of integration, selected a RS485 interface sensor, the sensor realizes the Modbus RTU slave function, as long as the client program to achieve Modbus RTU The client can read the temperature and humidity data. is convenient for the development, but the price is not expensive, asking for about 150 yuan.
Netizen Fangyuan recommended a only 7 yuan DHT11 temperature and humidity sensor, just started to think is the TTL level serial communication, later a study, originally through a data line two-way communication, and the timing is very strict, this thing may be easier to do with a single piece, with STM32 to do, but there is a tiger to eat the day, There's no way to feel it. Think about it, the ideal way may need to delve into the clock's input capture related knowledge.
But until three months later today, there is time and energy to study the relevant content. Gossip less, first look at the DHT11 of the typical application circuit (see the figure below).
The communication interface is a serial interface (one-way two-way), the communication process is as follows:
The signal representations of the numbers 0 and 1 are as follows (somewhat similar to the code of an infrared remote control):