0

My understanding is that circuit python will support bitbanging by default, but I might be mistaken...

For this example I am using a DHT11 temp and humidity sensor (I have a adafruit stemma/quic one on the way but shipping in Australia is awfully slow)

import board import adafruit_dht

# Initialize the DHT11 sensor
dht = adafruit_dht.DHT11()

# Read the temperature and humidity
temperature = dht.temperature
humidity = dht.humidity

# Print the values
print("Temperature: {:.1f} C".format(temperature))
print("Humidity: {:.1f} %".format(humidity))

and the error I am being returned is:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_dht.py", line 295, in __init__
  File "adafruit_dht.py", line 82, in __init__
Exception: Bitbanging is not supported when using CircuitPython.

I have tried using the adafruit_bitbangio library, but I haven't been making much headway with that whatever docs I see are navigating me to either use this, or that is should just work without it.

Any help on this topic would be a huge help!

Thanks.

  • It turns out that the DHT11 board is no longer supported by the m0 chip and will not function correctly with circuit python. https://learn.adafruit.com/dht/dht-circuitpython-code – Sam Getz Jan 20 '23 at 05:41

0 Answers0