loading
1 Comments

Tell us about yourself!

Complete Your Profile
  • RPI/HomeBridge Temperature/Humidity (DHT22) Sensor

    Hi I'm very new to this and have limited code knowledge. Im stuck on step 6 i got to the step of sudo apt-get install pigpio python-pigpio python3-pigpio and downloaded the DHT22 sample code but I'm stuck on this bit. Apply this patch to test_DHTXXD. This adds units to the response, and adds an error when pigpiod is not running.diff test_DHTXXD.c orig/test_DHTXXD.c 128c128 < printf("%d %.1f C %.1f %%\n", r.status, r.temperature, r.humidity);--- > printf("%d %.1f %.1f\n", r.status, r.temperature, r.humidity); 158,160d157 < } else { < fprintf(stderr, "ERROR: pigpiod not running\n"); < return 1;Compile with this commandgcc -Wall -pthread -o DHTXXD test_DHTXXD.c DHTXXD.c -lpigpiod_if2Copy DHTXXD to /usr/local/bin/dht22, and make executable.At thi...see more »Hi I'm very new to this and have limited code knowledge. Im stuck on step 6 i got to the step of sudo apt-get install pigpio python-pigpio python3-pigpio and downloaded the DHT22 sample code but I'm stuck on this bit. Apply this patch to test_DHTXXD. This adds units to the response, and adds an error when pigpiod is not running.diff test_DHTXXD.c orig/test_DHTXXD.c 128c128 < printf("%d %.1f C %.1f %%\n", r.status, r.temperature, r.humidity);--- > printf("%d %.1f %.1f\n", r.status, r.temperature, r.humidity); 158,160d157 < } else { < fprintf(stderr, "ERROR: pigpiod not running\n"); < return 1;Compile with this commandgcc -Wall -pthread -o DHTXXD test_DHTXXD.c DHTXXD.c -lpigpiod_if2Copy DHTXXD to /usr/local/bin/dht22, and make executable.At this point you should be able to test your DHT22 sensor with the commanddht22And it should respond with0 18.4 C 51.0 %I would appreciate your input Regards Aaron

    View Instructable »