Download Print this page

DFRobot FireBeetle ESP32-E Manual page 89

Advertisement

#include <WiFi.h>
#include <HTTPClient.h>
//Configure WiFi name and password
char *WIFI_SSID
= "WIFI_SSID";
char *WIFI_PASSWORD
= "WIFI_PASSWORD";
//Configure IFTTT
char *IFTTT_ENVENT
= "Your_Event";
char *IFTTT_KEY
= "Your_Key";
//IFTTT Send Message
char *IFTTT_VALUE_1
= "Value1";
char *IFTTT_VALUE_2
= "Value2";
char *IFTTT_VALUE_3
= "Value3";
HTTPClient ifttt;
unsigned long lastTime = 0;
unsigned long timerDelay = 10000;
void setup() {
Serial.begin(115200);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Wifi Connect Success");
}
void loop() {
//Send an HTTP POST request every 10 seconds
if ((millis() - lastTime) > timerDelay) {
//Check WiFi connection status
if(WiFi.status()== WL_CONNECTED){
ifttt IFTTTBeging(IFTTT ENVENT IFTTT KEY);

Advertisement

loading
Need help?

Need help?

Do you have a question about the FireBeetle ESP32-E and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Related Products for DFRobot FireBeetle ESP32-E

This manual is also suitable for:

Dfr0654