As the title says... Chat on...

User avatar
By zioax
#4191 I've flashed the nodemcu fw on my esp8266 and now I want to do something when i do a GET request to the esp8266 connected to the Arduino.

Ex.
Code: Select all192.168.1.1/led
must turn on the led by Arduino. But there is a problem, when i read the Serial from the Arduino the esp8266 crash. Why??
User avatar
By hwiguna
#4214 NodeMCU firmware is a little different from the original firmware. So you do not send "AT" commands there. You have to write some lua code to setup the webserver on the ESP. Thankfully that's just a few lines of lua code. You will need to modify it to suit your needs.

You could just send the whole payload received and do all the string processing in the Arduino, or you can write the processing in LUA in the ESP and have it emit a string for when you receive an ON url, and a string for off when you receive an OFF url. Based on those string (coming in via arduino serial port), then you would turn on/off the led. Let me know if that's still unclear.
User avatar
By zioax
#4216 I've already uploaded the lua code to esp8266, but the strange thing is that the when i open the serial terminal on Arduino it's blank, instead with Putty I can receive the GET response. Why??
User avatar
By hwiguna
#4218
zioax wrote:I've already uploaded the lua code to esp8266, but the strange thing is that the when i open the serial terminal on Arduino it's blank, instead with Putty I can receive the GET response. Why??

I presume you've already checked baud rate, parity etc. One thing I've ran into was that the firmware wants CR and LF for line ending. So make sure you choose that option in the arduino monitor window.