DHT11 Pico Library - C++ - Raspberry Pi Pico  1.0
The DHT11 Pico Library provides a C++ implementation for interfacing with the DHT11 temperature and humidity sensor on the Raspberry Pi Pico microcontroller. It offers functions to read temperature and relative humidity from the sensor and supports error handling. This library simplifies the integration of the DHT11 sensor into Pico-based projects, allowing developers to easily retrieve environmental data for various applications.
Classes | Variables
dht11-pico.h File Reference

DHT11 Sensor Library for Raspberry Pi Pico. More...

#include "pico/stdlib.h"
Include dependency graph for dht11-pico.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Dht11
 DHT11 Sensor Class. More...
 

Variables

const int THRESHOLD = 7
 Threshold for differentiating between bit 0 and bit 1 during DHT11 data transmission.
 
const int POLLING_LIMIT = 50
 Maximum number of polling attempts during DHT11 data transmission.
 
const int TRANSMISSION_ERROR = -999
 Error value returned when there is a transmission error during DHT11 data reading.
 
const long long RH_INT_MASK = 0xFF00000000
 Bit mask to extract the integer part of relative humidity from the raw data.
 
const long long RH_DEC_MASK = 0x00FF000000
 Bit mask to extract the decimal part of relative humidity from the raw data.
 
const long long TEMP_INT_MASK = 0x0000FF0000
 Bit mask to extract the integer part of temperature from the raw data.
 
const long long TEMP_DEC_MASK = 0x000000FF00
 Bit mask to extract the decimal part of temperature from the raw data.
 
const long long CHECKSUM_MASK = 0x00000000FF
 Bit mask to extract the checksum from the raw data.
 

Detailed Description

DHT11 Sensor Library for Raspberry Pi Pico.

This library provides a set of functions to interface with the DHT11 temperature and humidity sensor on the Raspberry Pi Pico microcontroller.

Definition in file dht11-pico.h.