Hello.
I config a Raspberry pie for SMS Gateway and I can send SMS with HTTP GET
and POST
like that.
http://website.com/index.php?app=ws&u=username&p=password&op=pv&to=number&msg=SMS
I want call this URL in blynk when my temperature going more than 35^C to send SMS.
I initialize DHT22 on NodeMCU ESP8266 like this :
#include <ESP8266.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <DHT.h>
#include <SimpleTimer.h>
#define DHTPIN 2
#define DHTTYPE DHT22 // DHT 22 Change this if you have a DHT11
DHT dht(DHTPIN, DHTTYPE);
// Set ESP8266 Serial object
#define EspSerial Serial
ESP8266 wifi(EspSerial);
SimpleTimer timer;
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "Your Auth Token";
void setup()
{
//No Serial console as the Nano only has 1 HW Serial
EspSerial.begin(115200); // Set ESP8266 baud rate
delay(10);
Blynk.begin(auth, wifi, "YourSSID", "Your Wifi PWD");
timer.setInterval(1000, sendData);
}
void sendData()
{
//Read the Temp and Humidity from DHT
float h = dht.readHumidity();
float t = dht.readTemperature();
//Write values to V04 and V05
Blynk.virtualWrite(4, h);
Blynk.virtualWrite(5, t);
}
void loop()
{
Blynk.run();
timer.run();
}
How Can I do it.
thank you in advance.