You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm relatively new to circuitpython, only started yesterday so apologies for any mistake I've made here.
Device: Teensy 4.0
DHT22 connected to pin D15
Powered from 3v3
PULL up resistor on data pin, actually the same circuit I've used successfully on other devices, just moved to the teensy 4.0
Coding on a macbook pro using Mu 1.0.3
adafruit_dht library copied to /lib from the latest library download: adafruit-circuitpython-bundle-5.x-mpy-20200417
No other modules in the lib folder
Code:
import board
import time
import adafruit_dht
print('Initialising...')
dht_device = adafruit_dht.DHT22(board.D15)
time.sleep(2)
print(dht_device)
while True:
temperature = dht_device.temperature
humidity = dht_device.humidity
print(str(temperature))
print(str(humidity))
time.sleep(2)
Full serial output:
code.py output:
Initialising...
<DHT22 object at 20209020>
Traceback (most recent call last):
File "code.py", line 12, in
File "adafruit_dht.py", line 242, in temperature
File "adafruit_dht.py", line 187, in measure
File "adafruit_dht.py", line 117, in _get_pulses_pulseio
ValueError: Object has been deinitialized and can no longer be used. Create a new object.
The text was updated successfully, but these errors were encountered:
I'm relatively new to circuitpython, only started yesterday so apologies for any mistake I've made here.
Device: Teensy 4.0
DHT22 connected to pin D15
Powered from 3v3
PULL up resistor on data pin, actually the same circuit I've used successfully on other devices, just moved to the teensy 4.0
Coding on a macbook pro using Mu 1.0.3
adafruit_dht library copied to /lib from the latest library download: adafruit-circuitpython-bundle-5.x-mpy-20200417
No other modules in the lib folder
Code:
Full serial output:
code.py output:
Initialising...
<DHT22 object at 20209020>
Traceback (most recent call last):
File "code.py", line 12, in
File "adafruit_dht.py", line 242, in temperature
File "adafruit_dht.py", line 187, in measure
File "adafruit_dht.py", line 117, in _get_pulses_pulseio
ValueError: Object has been deinitialized and can no longer be used. Create a new object.
The text was updated successfully, but these errors were encountered: