Skip to content

Instantly share code, notes, and snippets.

@yemreeke
Created March 26, 2021 15:15
Show Gist options
  • Save yemreeke/4b650d30975eee779e4ad7d0786119dc to your computer and use it in GitHub Desktop.
Save yemreeke/4b650d30975eee779e4ad7d0786119dc to your computer and use it in GitHub Desktop.
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <DHT.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define DHTPIN 3
DHT dht(DHTPIN, DHT11);
void setup() {
dht.begin();
lcd.begin();
}
void loop() {
int nem = dht.readHumidity();
float sicaklik = dht.readTemperature();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Sicaklik: ");
lcd.print(sicaklik);
lcd.setCursor(0,1);
lcd.print("Nem Orani: %");
lcd.print(nem);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment