Go Down

Topic: How to read DHD11 data and send by Sms? (Read 75 times) previous topic - next topic

sajjad95

hi ...

iwant read humidity dhd11 and send via sms.

Code: [Select]

#include <Sim800l.h>
#include <SoftwareSerial.h>
#include <dht11.h>
dht11 DHT;
#define DHT11_PIN 2

Sim800l Sim800l;
char* text1 = "Humidity";
char* number = "xxxxxxxxxx";
uint8_t index;


void setup(){
 
Serial.begin(9600);
Sim800l.begin();

Sim800l.delAllSms();
}

void loop()
{
  int chk;
  chk = DHT.read(DHT11_PIN);    // READ DATA
 
   if (DHT.humidity > 50)
    {
      Sim800l.sendSms(number,text1);
 
     }
  delay(1000);
}


What should this code be?
Code: [Select]
char* text1 = "Humidity";

knut_ny

Ny

Go Up