Skip to content

Instantly share code, notes, and snippets.

@ahmetus
Created March 24, 2020 13:41
Show Gist options
  • Save ahmetus/46eae05d5f26561f66f3e369c8704f85 to your computer and use it in GitHub Desktop.
Save ahmetus/46eae05d5f26561f66f3e369c8704f85 to your computer and use it in GitHub Desktop.
Esp32 DevkitV1 - DHT11 ve MicroPythonla Sıcaklık ve Nem Bilgisi Alma
from machine import Pin
import dht
import time
while True:
sensor = dht.DHT11(Pin(26))
sensor.measure()
print('Sıcaklık (Derece) = %.2f' % sensor.temperature())
print('Nem Oranı = %.2f' % sensor.humidity())
time.sleep(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment