JOBSHEET 1

DATA AKUISI SENSOR MENGGUNAKAN APLIKASI BLUETOOTH

A. ALAT BAHAN
 Arduino Uno. Any copy will do! I use the RobotDyn Uno.
 HC-06 Bluetooth Module
 DHT11 Temp* & Humidity Sensor
 Jumper wires Set MM/FF/MF
 Android Phone

B. LANGKAH KERJA
1. Siapkan alat dan bahan yang digunakan.
2. Rancang alat dan sensor seperti pada Gambar 1 berikut.
#include "DHT.h"
#define DHTPIN 2 // what digital pin we're connected to
// Uncomment whatever type you're using!
#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
Serial.println("BlueCore Tech Temperature and Humidity");
dht.begin();
}
void loop() {
// Give it time to calibrate
delay(20000);
float h = dht.readHumidity();
// Read Celsius
float t = dht.readTemperature();
// Read Fahrenheit (isFahrenheit = true)
float f = dht.readTemperature(true);

// Check errors
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println("Failed to read from DHT sensor!");
Gambar 1. Skema Rangkaian
return;
}
3. Tulis program berikut pada Gambar 2 kemudian upload program yang diinginkan
// Compute heat index in Fahrenheit (the default)
menggunakan
float Arduino IDE.h);
hif = dht.computeHeatIndex(f,
// Compute heat index in Celsius (isFahreheit = false)
float hic = dht.computeHeatIndex(t, h, false);

Serial.println("Humidity: ");
Serial.print(h);
Serial.println(" %.");
Serial.println(" ");
Serial.println("Temperature: ");
Serial.print(t);
Serial.println(" Degrees ");
}

.

4. Hasil Data ……………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……… D. Ikuti perintah di bawah ini: . Ketikkan “AT+PINxxx” untuk mengeset pin bluetooth. Analisa Data .ganti xxx dengan nama bluetooth yang diinginkan .Ketikkan “AT+Namexxx” untuk mengeset nama dari bluetooth. ganti xxx dengan pin bluetooth yang diinginkan C.Buka fitur serial monitor .Buka aplikasi Arduino IDE .Ketikkan “AT” (tanpa tanda petik) untuk mengecek koneksi bluetooth .Hubungkan USB TTL programmer ke HC-05/HC-06 .

……………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……………………………………………………………………………………………………… ……… .