top of page

Monitoring Suhu menggunakan Arduino UNO


Note :

  • Arduino UNO

  • Dht 11

  • LCD with I2C

  • Resistor 10 K

  • Garis berwarna merah adalah VCC

  • Garis berwarna hitam adalah Ground

  • Garis berwarna biru merupakan kaki Data dht 11 yang terhubung ke port arduino D2

  • Garis berwarna hijau merupakan kaki SCL yang terhubung ke port arduino A5

  • Garis berwarna orange merupakan kaki SDA yang terhubung ke port arduino A4


Skecth Program :


#include "DHT.h

#define DHTPIN 2

#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

#include <LiquidCrystal_I2C.h>

#include <Wire.h>

LiquidCrystal_I2C lcd( 0x27,16, 2);


void setup()

{

lcd.init();

lcd.backlight();

lcd.clear();

lcd.print(">> Monitoring <<");

delay(3000);

lcd.clear();

lcd.print("Starting.....");

delay(3000);

lcd.begin(16,2);

dht.begin();

}


void loop()

{

int h = dht.readHumidity();

int t = dht.readTemperature

lcd.setCursor(0, 0);

lcd.print("Suhu: ");

lcd.print(t);

lcd.print(" C");

lcd.setCursor(0,1);

lcd.print("Kelembaban: ");

lcd.print(h);

lcd.print(" %");

delay(200);

}



Featured Posts
Check back soon
Once posts are published, you’ll see them here.
Recent Posts
Archive
Search By Tags
No tags yet.
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page