Go Down

Topic: ESP8266 (Read 106924 times) previous topic - next topic


If you use LUA, you could make a simple webserver like this:


Code: [Select]
if(t==nil) then
srv=net.createServer(net.TCP) srv:listen(80,function(conn)
    conn:on("receive",function(conn,payload) print(payload)
    conn:send("HTTP/1.1 200 OK\n\n")
    conn:send("<h1>Erni's ESP8266</h1><BR>")
    conn:send("TEMP : " .. t .. "<BR>")
    conn:send("NODE.HEAP : " .. node.heap() .. "<BR>")
    conn:send("TMR.NOW : " .. tmr.now() .. "<BR>")
    conn:on("sent",function(conn) conn:close() end)


Hello Team,

I am having Issue while connecting ESP8266 with Arduino Mega. It always says "Module have no response."

Please check and correct me if I am wrong anywhere.

 I am using below code and and wiring diagram is on this URL: http://3.bp.blogspot.com/-u7cLC4-x72c/VVGGVWfPmrI/AAAAAAAAci0/RYynhrWZQ38/s1600/wiringDiagram.png

//#include <SoftwareSerial.h>
   //use mega Serial 2 for serial monitor; Serial 1 on pins 19 (RX) and 18 (TX);// Serial2 on pins 17 (RX) and 16 (TX), Serial3 on pins 15 (RX) and 14 (TX).
   #define SSID "SopraSteria"
   #define PASS "1234567890"
   #define DST_IP "" //baidu.com
   //SoftwareSerial dbgSerial(10, 11); // RX, TX
   void setup()
     // Open serial communications and wait for port to open:
     //serial 2 is to esp8266
     Serial2.begin(115200);//9600 (mine), 57600, 115200
     //serial 0 is to usb
     //dbgSerial.begin(9600); //can't be faster than 19200 for softserial
     //dbgSerial.println("ESP8266 Demo");
     Serial.println("ESP8266 Demo on Mega2560");
       //test if the module is ready
     Serial.println("Resetting module");
       //dbgSerial.println("Module is ready");
       Serial.println("Module is ready");
       //dbgSerial.println("Module have no response.");
       Serial.println("Module have no response.");
     //connect to the wifi
     boolean connected=false;
     for(int i=0;i<5;i++)
         connected = true;
     if (!connected){
      Serial.println("Not Connected.");
     //print the ip addr
     Serial.println("ip address:");
     while (Serial2.available())
     //set the single connection mode
   void loop()
     String cmd = "AT+CIPSTART=\"TCP\",\"";
     cmd += DST_IP;
     cmd += "\",80";
     if(Serial2.find("Error")) return;
     cmd = "GET / HTTP/1.0\r\n\r\n";
         //dbgSerial.println("connect timeout");
         Serial.println("connect timeout");
       while (Serial2.available())
         char c = Serial2.read();
         //if(c=='\r') dbgSerial.print('\n');
         if(c=='\r') Serial.print('\n');
     boolean connectWiFi()
       String cmd="AT+CWJAP=\"";
         //dbgSerial.println("OK, Connected to WiFi.");
         Serial.println("OK, Connected to WiFi.");
         return true;
           //dbgSerial.println("Can not connect to the WiFi.");
           Serial.println("Can not connect to the WiFi.");
           return false;


Would you mind sharing how your AP mode ESP8266 works? I see in post #75 in this discussion that you are doing something close to what I want to do...
Have a local network (AP mode?) established by the ESP, which then serves a web page.


Hi guys,
I have this ESP8266-12 Test board, like the one in this link: http://blog.squix.ch/2015/01/esp8266-test-board-review.html
I have been playing it for the past one week. All long, i was using the firmware using ESP_flasher tool.
I wanted to upgrade to the latest one, found in the expressif github page: https://github.com/espressif/ESP8266_AT/tree/master/bin
But while downloading the third file: esp_init_data_default.bin, at the address ,0x7C000, I got a floating point division error.
Still i continued to flash the last file, blank.bin on address 0x7E000. After that I've been encountering this weird problem:
I am powering the module with 3 AA batteries, which has about 3.4V now.  But when i power the esp8266, the voltage shows 2.9v and is constantly decreasing, ultimately the power leds keep on dimming until the board gets fully switched off.
If I take out one battery for about 5 mins, and put it back, it again glows brightly slowly losing voltage until it again shuts down.
While it is powered up, I am still able to flash firmwares to it, but i get only garbage at some random baud rates.
I dont know what to do now. All my connections are correct, and I could very well use the ESP. I dont know whats causing the problem now.!
Please help me out.


Replaced the board with a fresh set of batteries. Its working good now!
Since this happened right after flashing the new firmware, I got freaked out! Maybe I should switch to rechargeable AA batteries or use a 5V DC adapter and regulate it to 3.3 V.


Dec 11, 2015, 11:14 pm Last Edit: Dec 11, 2015, 11:24 pm by twim
Hi all,
I'm worked the last few night for an ambitious project. Build a cheap WiFi shield for the Arduino boards using the ESP8266 module.
I want to use the standard ESP firmware and I have a programming model similar to the Ethernet/WiFi libraries so I can reuse existing code.

Here are some links:

Let me know if you find it useful or if you have problems making it.


Hi guys,

I just bought an ESP8266-01. I hooked it up with my UNO but it does not work. I've spent hours try to fix it, but still can't make it work. Here's how I hook it up:

1) Vin from UNO --> 3.3V regulator --> ESP8266 VCC
2) UNO Rx --> ESP8266 Rx (i tried Rx to tx still doesnt work)
3) UNO Tx --> ESP8266 Tx
4) ESP8266 CHPD --> VCC (3.3V)

I flashed in an empty sketch to my UNO (bare min). When I opened the serial terminal from Arduino IDE, it seems that it doesnt detect anything. I've already tried it with different baud rate and tried both "Carriage Return" and "Both NL&CR". Whenever I send "AT" it won't respond back.

Also, when I power the UNO, the blue light on the ESP8266 is constantly on. I saw some tutorials on youtube and it seems that it should only blink once after being powered. Anyone know what it means if the blue light is constantly on?

Thank you!




How to Send data from esp8266 to localhost server using arduino mega


I want to use ESP8266 like bluetooth.In this way i want to provide data exchange  between arduino and android phone .I dont found  sample program.Can i help me :) thanks a lot.


I am using ESP8266 module.Any one know how set the module with a static IP ?. Is it possible or not?
Looking for replay....


Does ESP8266 module able to set with static IP while connecting to network?


Have a look at this thread with an code example at the end:


Please use voltage divider because esp8266 use 3.3V and you transmite from arduino 5V.
If you use adator in one line with the bulb, when the bulb on, the adaptor voltage rise more then 5V.
It can burn your esp8266.
It happend to me when I try using remote switch that use adaptor the same line with the bulb. The capasitor exploded.
So use separate line between  adaptor and bulb, and use voltage divider.


I think I killed my ESP12.

I have been messing with it for a few weeks and have added servos, a DHT11 and an OLED. All was going well. I wanted to update a web page with the temperature and humidity so went looking through the examples for one that sounded like it would update without reloading the whole page.

I opened WebUpdater.ino, that sounded hopeful and I stuck it on the ESP. I got two buttons so I clicked them and one popped up a load file box which I duly selected any old file from.

One dead ESP later. Seems a bit daft to me to include examples with no warning or indication of what they do. Of course it's easy with hindsight to go and Google the thing and see what it is but this isn't normally something one would do when browsing examples provided for using and learning.

Anyhow, the problem is there, is there a solution other than replacing the ESP?

Go Up