Tutorial Monitoring Suhu dan Kelembapan Udara berbasis Arduino Nano R3


Berikut adalah Tutorial Monitoring Suhu dan Kelembapan Udara berbasis Arduino Nano R3

Ini adalah sketch program arduino

/*
11_DHT11 Monitoring Suhu Kelembapan Bluetooth
*/

#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>

#define DHTPIN 2
#define DHTTYPE    DHT11

DHT dht(DHTPIN, DHTTYPE);

void setup()
{
Serial.begin(9600);
dht.begin();
}

void loop()
{
delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t))
{
Serial.println(F("Failed to read from DHT sensor!"));
return;
}
Serial.print(F("Humidity: "));
Serial.print(h);
Serial.print(F("%  Temperature: "));
Serial.print(t);
Serial.println(F("°C "));
}


Like it? Share with your friends!

0

0 Comments

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

Choose A Format
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Meme
Upload your own images to make custom memes
Video
Youtube, Vimeo or Vine Embeds
Audio
Soundcloud or Mixcloud Embeds
Image
Photo or GIF
Gif
GIF format