To interface Bluetooth with Arduino to send dht11 sensor data to smartphone using Bluetooth.

Описание к видео To interface Bluetooth with Arduino to send dht11 sensor data to smartphone using Bluetooth.

To interface Bluetooth with Arduino to send dht11 sensor data to smartphone using Bluetooth.
Program


#include "DHT.h"
#define DHTPIN 2
#define DHTTYPE DHT11 // DHT 11
DHT dht(DHTPIN, DHTTYPE);
void setup()
{


Serial.begin(9600);
dht.begin();

}

void loop()
{

float h = dht.readHumidity();

float t = dht.readTemperature();
if (isnan(h) || isnan(t))
{
Serial.println("Failed to read from DHT sensor!");
return;
}

Serial.print("HUMIDITY IS ");
Serial.println(h);
delay(1000);

Serial.print("TEMP IS ");
Serial.println(t);
delay(1000);



}

Комментарии

Информация по комментариям в разработке