Problem displaying text on web page
Posted: Sat Feb 22, 2020 6:58 am
I uploaded the attached sketch DisplaySerialOnWebpage from the Arduino IDE to the ESP8266 on a WeMos Uno+WiFi clone. Ultimately, I want the sketch to read text from the Uno on the board and display it on Safari, on an iMac, but to test the connection I ran the ESP8266 independently and sent and received serial data from/to the Arduino IDE monitor.
The ESP8266 connects to my local network router and Safari starts to connect to the ESP8266, but freezes before completing the connection and displaying the introductory message (ESP8266 here!). The ESP8266 continues to read from and echo to the Arduino monitor but nothing is displayed until I enter a line starting with 'x', closing the WiFi connection, at which point everything is displayed on Safari. The attached files Monitor.png and Safari.png show the completed input/output.
As you can see from the sketch, I have (successfully?) set the ESP8266 connection to no delay and automatic flush, as well as manually flushing the client after each transmission. What can I do, or what am I doing wrong, to force the immediate display of text on Safari as soon as each line of text is sent?
When I preview this message it says that the DisplaySerialOnWebpage.ino file is not downloaded yet. I don't know what to do about this, so I am submitting the message anyway. If the file doesn't transmit please tell me and I will try again to upload it.
The ESP8266 connects to my local network router and Safari starts to connect to the ESP8266, but freezes before completing the connection and displaying the introductory message (ESP8266 here!). The ESP8266 continues to read from and echo to the Arduino monitor but nothing is displayed until I enter a line starting with 'x', closing the WiFi connection, at which point everything is displayed on Safari. The attached files Monitor.png and Safari.png show the completed input/output.
As you can see from the sketch, I have (successfully?) set the ESP8266 connection to no delay and automatic flush, as well as manually flushing the client after each transmission. What can I do, or what am I doing wrong, to force the immediate display of text on Safari as soon as each line of text is sent?
When I preview this message it says that the DisplaySerialOnWebpage.ino file is not downloaded yet. I don't know what to do about this, so I am submitting the message anyway. If the file doesn't transmit please tell me and I will try again to upload it.