I was trying to connect a temp/humidity sensor that I have used previously with a raspberry pi. From what I have found, there is no library available for the micro:bit. The closest I have found is https://github.com/polygontwist/uPython-DHT22 but this is designed for the pyboard.
Has anyone successfully used this sensor with the micro:bit?
Is there a library available and I have just failed to locate it?
Is anyone able to port the above version so that it will work with the micro:bit?
Thank you.
DHT22 or AM2302 Sensor with micro:bit
Re: DHT22 or AM2302 Sensor with micro:bit
DHT11, DHT22 and AM2302 only support the 1 wire interface.
I haven't tried using one with a micro:bit yet.
If you switch to a DHT12 or AM2320 (roughly same price), you can use their more user friendly I2C interface.
You could try porting these to the micro:bit. You may need to change some method names.
https://github.com/mcauser/micropython- ... /am2320.py
https://github.com/mcauser/micropython- ... r/dht12.py
I haven't tried using one with a micro:bit yet.
If you switch to a DHT12 or AM2320 (roughly same price), you can use their more user friendly I2C interface.
You could try porting these to the micro:bit. You may need to change some method names.
https://github.com/mcauser/micropython- ... /am2320.py
https://github.com/mcauser/micropython- ... r/dht12.py
-
- Posts: 168
- Joined: Tue Nov 07, 2017 11:45 pm
Re: DHT22 or AM2302 Sensor with micro:bit
I've written microbit code for dht11 and am2320 (in one wire mode) neither worked. micropython on a microbit runs too slow