Hey guys, i'm new here so i'm sorry if i'm posting in the wrong place :frowning:

I'm having a few issues to connecting ESP8266 with IFTTT service.

I know how to create a new Applet and how to configure it.

My doubt is how do i create this connection between ESP8266 to IFTTT service?

I have a ultrasonic sensor in my project. This sensor is going to be attached in a car. The main goal of the sensor, is "telling me" when if the car is overturned.

Here's my code to a best explanation:

#include <Ultrasonic.h>
#define pin_trigger D1
#define pin_echo D2

Ultrasonic ultrasonic(pino_trigger, pino_echo);

void setup()
Serial.println(“Reading sensor data…”);

void loop()

float cmMsec;
long microsec = ultrasonic.timing();
cmMsec = ultrasonic.convert(microsec, Ultrasonic::CM);
if (cmMsec <=30)
Serial.println("Car OK");
Serial.println("Car is overturned");

In case the sensor detects a distance < 30, it means the situation is OK and the car is OK.. When something else happens, the sensor should send a trigger to IFTTT who is going to send to my phone a message saying the car is overturned.

My problem is, how do i put this condition inside my code? I know i should put this inside a IF sentence. But i dont know how to "call" the event because i see a lot of diferent codes to do it, and none of it worked on this projetc. I'm sorry, i'm new with programming, maybe is something easy to do, but i'm really losing my mind to do it.

What should i do? I just need to call the event?

There is two choices on IFTTT website:

I can make a POST or GET the web service:


I can use a curl comand line:
curl -X POST

In this case to make the event work i just need to open a webpage from ESP8266 whith some of theses adresses above?
Can some of you guys help me? I dont know how to make my ESP8266 comunicate with IFTTT =(