[SOLVED] DHT Temp and Humidity Sensor Showing 0's and -1

Hello All,
I can’t seem to debug my Temperature and Humidity Sensor (v1.2) problems. I had it working always during the past month, but now it does not seem to work and just prints out -1, -1 or 0, 0. In the past when I ran into this problem, I updated the firmware and that fixed it, but now it isn’t . I followed all the steps on this previous forum, redownloading the GrovePi Software, updating firmware, rebooting, etc. Im still running into the same problem. Also, I have TWO DHT Temp and Humidity and both are giving me the same reading. I am using a RasperryPi 3+. I think perhaps the problem is I recently updated Raspian and perhaps there are environmental issues that transpired with that update? Any help would be greatly appreciated!

Below is my log.txt info

Check space left
================
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        13G  6.8G  5.5G  56% /
devtmpfs        460M     0  460M   0% /dev
tmpfs           464M     0  464M   0% /dev/shm
tmpfs           464M   13M  452M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p6   68M   22M   47M  33% /boot
tmpfs            93M     0   93M   0% /run/user/1000
/dev/mmcblk0p5   30M  452K   28M   2% /media/pi/SETTINGS1

Check for dependencies
======================
python 2.7.13-2 install ok installed
python-pip 9.0.1-2+rpt2 install ok installed
git 1:2.11.0-3+deb9u3 install ok installed
libi2c-dev 3.1.2-3 install ok installed
python-serial 3.2.1-1 install ok installed
python-rpi.gpio 0.6.3~stretch-1 install ok installed
i2c-tools 3.1.2-3 install ok installed
python-smbus 3.1.2-3 install ok installed
arduino 2:1.0.5+dfsg2-4.1 install ok installed
minicom 2.7-1.1 install ok installed
scratch 1.4.0.6~dfsg1-5 install ok installed

find: ‘/run/user/1000/gvfs’: Permission denied
find: ‘/proc/694/task/694/net’: Invalid argument
find: ‘/proc/694/net’: Invalid argument
wiringPi Not Found (ERR)
find: ‘/run/user/1000/gvfs’: Permission denied
find: ‘/proc/694/task/694/net’: Invalid argument
find: ‘/proc/694/net’: Invalid argument
I2C still in blacklist (ERR)
SPI still in blacklist (ERR)


Check for addition in /modules
==============================
I2C-dev already there
i2c-bcm2708 already there
spi-dev already there


Hardware revision
=================
gpio version: 2.46
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Pi 3, Revision: 02, Memory: 1024MB, Maker: Embest 
  * Device tree is enabled.
  *--> Raspberry Pi 3 Model B Rev 1.2
  * This Raspberry Pi supports user-level GPIO access.


Check the /dev folder
=====================
i2c-1
ttyAMA0

USB device status
=================
Bus 001 Device 005: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 004: ID 413c:2107 Dell Computer Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 5: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
Raspbian for Robots Version
===========================
cat: /home/pi/di_update/Raspbian_For_Robots/Version: No such file or directory


Hostname
========
raspberrypi


Checking for Atmega chip
========================


avrdude: Version 5.10, compiled on Jun 18 2012 at 12:38:29
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : unknown
         Using Programmer              : gpio
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : GPIO
         Description     : Use sysfs interface to bitbang GPIO lines

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK

avrdude done.  Thank you.


Checking I2C bus for devices
============================

Checking I2C bus 0
==================
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory

Checking I2C bus 1
==================
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- 04 -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1e -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Checking for firmware version
=============================
GrovePi has firmware version: 127.255.255

Hi @gjgarvil,

The firmware of the GrovePi hasn’t been updated in a very long time - well except for the beta we have in our pipe, but it’s not yet available for the general use. So, there’s no reason why the DHT would stop working altogether.

The version of the GrovePi firmware that is indicated in the log’s output is way off from what it should be: 127.255.255 is definitely not a good response. Also, since we haven’t updated the firmware, it wouldn’t make any sense to stop working suddenly.
Did you somehow changed the source code of the firmware and then forgot about that and flashed the firmware?

Here’s what I suggest you so we can be on the same page:

  1. Burn an image with Raspbian For Robots or just pure Rasbian. Doesn’t exactly matter which one.

  2. Run curl -kL dexterindustries.com/update_grovepi | bash.

  3. Reboot.

  4. Re-run the troubleshooter.

And then let me know how it went for you.

Robert,
Thanks for the email. I actually found the problem. I had accidentally put the GPS sensor in one of the I2C ports and that was what was causing the temperature and humidity errors. When I unplugged the GPS sensor, the Temp and Humid were functioning fine and providing the correct data. One quick question, what script/file (python) do you recommend using to run the GPS? There are a few different in the grove_gps folder and wanted to know which one you recommend. Thanks a lot for your reply and feedback, it is greatly appreciated.

Greg

Hi @gjgarvil,

That’s great. Glad you figured it out.

As for the GPS sensor, I’d go with this module as it uses regex to parse the NMEA data - much better than the others:

I recommend you read the README in that folder.

Thank you!

This topic was automatically closed after 42 hours. New replies are no longer allowed.