I am working on the development of a multi-sensor node. I have DHT22 Noise and Light sensors on my Board connected to Arduino Nano. I am using the standard libraries to access their data. Since DHT22 takes almost 2 seconds to read the data it affects the values of other sensors. I have tried FreeRTOS library to solve the problem but I am still getting the issue. When I print the values of other tasks it waits for a moment and then prints due to the delay of the DHT22 library. I have attached my code below. Currentlly the code is reading from two sensors (DHT22 and Noise) and printing only value of the noise sensor.
Muhammad Nabeel Tahir
Node_FreeRTOS.ino (1.56 KB)