Post by s0urkraut86 on Mar 3, 2019 16:26:25 GMT -8
I have my AM2315 plugged in correctly, J7 on the weatherboard and when i run the test script, i get the following error. Judging by the error it looks like it can't find the sensor. I had this plugged into the ourweather weather board and it worked fine back then.
[email protected]:~/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_AM2315 $ python testAM2315.py Traceback (most recent call last): File "testAM2315.py", line 6, in <module> thsen = AM2315.AM2315() File "/home/pi/git/switchdoc/SDL_Pi_GroveWeatherPi/SDL_Pi_AM2315/AM2315.py", line 25, in __init__ import Adafruit_GPIO.I2C as I2C ImportError: No module named Adafruit_GPIO.I2C
Post by s0urkraut86 on Mar 4, 2019 11:30:37 GMT -8
I am sorry that was the wrong paste i have Adafruit_GPIO.I2C installed, this is the error i am currently seeing when running testAM2315.py from this directory~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_AM2315 but when i run testAM2315.py script thats in the root directory of SDL_Pi_GroveWeatherPi i get actual results. is it intended to be ran from the root directory instead of in the folder?
[email protected]:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_AM2315 $ python testAM2315.py T Traceback (most recent call last): File "testAM2315.py", line 7, in <module> print "T ", thsen.read_temperature() File "/home/pi/git/SDL_Pi_GroveWeatherPi/SDL_Pi_AM2315/AM2315.py", line 124, in read_temperature self._read_data() File "/home/pi/git/SDL_Pi_GroveWeatherPi/SDL_Pi_AM2315/AM2315.py", line 97, in _read_data self.humidity = ((tmp << 8) | tmp) / 10.0 TypeError: 'NoneType' object has no attribute '__getitem__'