From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy (5)

Bluetooth protocol stack development

This series of tutorials will be combined with TI's CC254x SoC series to explain the development process of Bluetooth 4.0 from the construction of the environment to the development of the Bluetooth 4.0 protocol stack. The tutorial is divided into six parts. This article is the fifth part:

The fifth part of the knowledge points:

Click to browse the next page Section 21 DHT11 Temperature and Humidity Sensor

Click to browse the next page Section 22: Slave Communication of the Bluetooth Protocol Stack

Click to browse the next page The twenty-third section of the Bluetooth protocol stack master-slave host communication

Click to browse the next page Section 24 OAD Air Upgrade

Click to browse the next page Section 25 SBL Serial Port Upgrade

For an introduction to TI's CC254x chip, you can click on the link below to view:

Mainstream Bluetooth BLE control chip detailed (1): TI CC2540

Recommended in the same series:

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy (1)

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy (2)

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy (3)

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy (4)

For the download of the tool for this article, you can go to the following address:

Zhu Zhaoyu ForARM

Section 21 DHT11 Temperature and Humidity Sensor

Introduction to DHT11

The DHT11 digital temperature and humidity sensor is a temperature and humidity composite sensor with a calibrated digital signal output. It uses dedicated digital module acquisition technology and temperature and humidity sensing technology to ensure high reliability and excellent long-term stability. The sensor consists of a resistive wetted element and an NTC temperature measuring element connected to a high performance 8-bit microcontroller. Therefore, the product has the advantages of excellent quality, ultra-fast response, strong anti-interference ability and high cost performance. Each DHT11 sensor is calibrated in an extremely accurate humidity calibration chamber. The calibration coefficients are stored in the OTP memory as a program, and these calibration coefficients are called internally during the processing of the test model. The single-wire serial interface makes system integration easy and fast. Its ultra-small size and low power consumption make it the best choice for even the most demanding applications. The product is a 4-pin single-row pin package for easy connection.

Technical Parameters

Supply voltage: 3.3~5.5V DC

Output: Single bus digital signal

Measuring range: humidity 20-90% RH, temperature 0~50 °C

Measurement accuracy: humidity +-5%RH, temperature +-2°C

Resolution: Humidity 1% RH, temperature 1 °C

Interchangeability: fully interchangeable,

Long-term stability: < ±1% RH/year

The DHT11 digital wet temperature sensor uses a single bus data format. That is, a single data pin port completes the input and output bidirectional transmission. Its data packet consists of 5Byte (40Bit). The data is divided into fractional part and integer part. The complete data transmission is 40bit, and the high position is first out. The data format of DHT11 is: 8bit humidity integer data +8bit humidity fractional data +8bit temperature integer data +8bit temperature fractional data +8bit checksum. The checksum data is added by the first four bytes. The sensor data outputs unencoded binary data. Data (humidity, temperature, integers, decimals) should be treated separately. For example, the data read from DHT11 is as shown:

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy

Protocol stack DHT11 test

Open the DHT11Example project and we initialize DHT11 in the startup event. If the initialization fails, the sensor is not connected.

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy

The temperature and humidity values ​​are then read periodically during the timed event. The result is displayed to the PC via the UART.

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy

From which you can see that the current temperature is 29 degrees Celsius and the humidity is 30%. You can see that the temperature and humidity have risen when you breathe at the sensor.

From shallow to deep, Bluetooth 4.0/BLE protocol stack development strategy

Studio Headphones/Audio Headphones/amazon headphones/Basic Wired Headphone

Studio headphone is suitable for many electronic equipment, such as mp3 Player, computer.

It\'s of high quality and fashion design. Pretty cool. Unique ear cups design is well matched with your ears. 

1). Perfect voice, pretty cool appearance
2). Fashion colorful headphones design
3). Its frame is made from light, high rigidity material. Light and strong
4). CE and ROsH
5). Different color for choosing
6). Competitive price
7). Optimum impedance ensures universal compatability
8). Very comfortable, even if used for long periods of time

Basic Wired Headphones


Studio Headphones

Studio Headphones,Beats Studio Wireless,Beats Studio 2.0 Wireless,Beats Studio Headphones

Shenzhen Greater Industry Co., Ltd. , https://www.szgreater.net