-->
Page 1 of 1

Get Incoming data from WIFI in interrupt

PostPosted: Thu Jul 27, 2017 9:42 am
by M0rt3z4
hi guys
I want get incoming data from WIFI in interrupt ,like this:

Code: Select all#define SERVER_PORT   port_num
WiFiServer server(SERVER_PORT);
WiFiClient client;
String command = "";
String ssid = "esp8266";
String pass = "12345678";

setup() {
    //setup wifi
    if (WiFi.softAP(ssid.c_str(), psw.c_str())) {
          server.begin();
     }

   //setup wifi interrupt
}

loop() {
   //do some work based on received data from wifi
}

isr() {
   //get incoming data from wifi
   command = client.readStringUntil('\r');
}

Re: Get Incoming data from WIFI in interrupt

PostPosted: Thu Jul 27, 2017 10:50 pm
by tele_player
Why would you want this?

Re: Get Incoming data from WIFI in interrupt

PostPosted: Fri Jul 28, 2017 4:54 pm
by gdsports
Just poll for incoming data in loop(). There is no interrupt for WiFi data. ESP8266 libraries include examples.

https://github.com/esp8266/Arduino/tree ... /libraries

Re: Get Incoming data from WIFI in interrupt

PostPosted: Sun Jul 30, 2017 9:59 am
by M0rt3z4
tele_player wrote:Why would you want this?

I want to use in rgbcontroller when applying different effects, so that I can control the speed and intensity of the light of the effects simultaneously .