Ir sensor with ESP8266 (webinterface)

Hello,

I built a small infrared sensor with my code (see end) I managed to get it displayed on the serial monitor when something is in front of the infrared sensor. That also works so far. However, I would like to be able to read this data from my mobile phone or PC via WIFI without connecting the device to them by cable. Can anybody help me with this ?
/*
*/
//

#define s1 19
#define s2 20
#define s3 21

void setup() {

pinMode( s1, INPUT);
pinMode( s2, INPUT);
pinMode( s3, INPUT);

Serial.begin(9600);

}

void loop() {
{digitalRead(s1);
digitalRead(s2);
digitalRead(s3);
}
if(digitalRead(21)+ digitalRead(20)+ digitalRead(19)< 3) {
Serial.println("Sombody´'s there!");

delay(10);
}
else { Serial.println ("....");
{ delay(10);
}
}
}

What's the point of doing that?

Please remember to use code tags when posting code.

Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

You can go back and fix your original post by highlighting the code and clicking the </> in the menu bar.
code tags new

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.