small C++ library to drive the DHT22 sensor via SPI bus
The advantage is, that it uses next to no CPU resources as everything runs in hardware on most platforms. This allows a multitaking OS like Linux to reliably read the sensor without issues.
have a look here: https://easyeda.com/Neegu0Sh/dht22-spi-driver