Micropython Read DHT22

MicroPython Open Kit Simulator ↗ All recipes
Tip: Ctrl+↵ to run
Python runs in your browser. Hit Run to execute — first run downloads the Python runtime (~10 MB), then it's instant. Note: GPIO calls won't actually toggle your Pi's pins from a browser. Use this to test logic, then run the .py on your Pi.

About this recipe

Libraries / imports

machine dht time

Hardware / pins

GPIO4 DHT22

Key API calls

print() sleep()

How to run

Press Run — executes in a Web Worker. Edits auto-save.
Editor python edits auto-save
Output ready
Output will appear here after you click Run.