2
2
3
3
/*
4
4
esp8266WebSerial
5
- Latest version: 1.2.0 - 2016-09-xx by James Newton
5
+ Version: 1.3.1 - 2018-02-12 by James Newton
6
+ Support for ST7735 and ILI9341 and other LCD displays via TFT_eSPI
7
+
8
+ Version: 1.3.0 - 2017-12-xx by James Newton
9
+ ESPAsyncWebServer for reliable operation
10
+ Log incoming data / status to server, stream commands from server out to the connected device
11
+ Low power cycle config: sleep for x seconds, wake send data / status to server as available or every x wake cycles.
12
+ "Blink Detect" input to watch error lights, etc... on remote devices (with optional photodiode and flipflop for detection during sleep)
13
+ Wake without radio for very low power input monitoring
14
+ "Pico Jason" interpreter for commands from server to ESP to configure power cycles, logging.
15
+
16
+ Version: 1.2.0 - 2016-09-xx by James Newton
6
17
https://github.com/JamesNewton/esp8266WebSerial
7
18
8
19
Based on:
@@ -23,7 +34,7 @@ Based on:
23
34
-----------------------------------------------------------------------------------------------
24
35
History
25
36
26
- Latest Lassen version : 1.1.3 - 2015-07-20
37
+ Version : 1.1.3 - 2015-07-20
27
38
Changed the loading of the Javascript and CCS Files, so that they will successively loaded
28
39
and that only one request goes to the ESP.
29
40
@@ -46,6 +57,7 @@ a fixed Cache-Control: max-age=### works ok. At least in Chrome.
46
57
response->addHeader ( "Last-Modified", "Wed, 25 Feb 2015 12:00:00 GMT" );
47
58
response->addHeader ( "Cache-Control", "max-age=86400" );
48
59
Actually, the Last-Modified doesn't seem to be needed... Chrome gets by fine with just max-age. Good enough for now.
60
+
49
61
Putting each page all in one string would be more reliable, but wastes gobs of memory.
50
62
Or we could make ONE page with everything and sections in tabs:
51
63
http://callmenick.com/post/simple-responsive-tabs-javascript-css
@@ -61,6 +73,9 @@ Why doesn't that code have to close the connection? E.g. how does server know co
61
73
use server.close()? Opened an issue about it.
62
74
https://github.com/esp8266/Arduino/issues/2481
63
75
76
+ TODO: Looks ESPAsyncWebServer has support for all that already built in:
77
+ https://github.com/me-no-dev/ESPAsyncWebServer#template-processing
78
+
64
79
Added serial data flow from simple web form to serial port and from serial port to web via regular polling.
65
80
Debug msgs and startup garbage from bootloader are on the standard serial lines TX GPIO1, RX GPIO3.
66
81
Need to keep actual serial data seperated. Use this serial.swap() to move to different pins, TX GPIO15, RX GPIO13
91
106
#define RTS_OUT 14
92
107
// not used. May become cable disconnect detect?
93
108
94
- // #define BAUD_RATE 9600
95
- #define DEBUG_BAUD_RATE 38400
109
+ // TODO: Support user configurable device baud rate
110
+ // #define BAUD_RATE 38400
96
111
#define BAUD_RATE 9600
97
112
113
+ // TODO: Support seperate baud rate for debug messages?
114
+ #define DEBUG_BAUD_RATE 38400
115
+
98
116
#define AdminTimeOut 0
99
117
// 600
100
118
// Defines the Time in Seconds, when the Admin-Mode will be diabled
101
119
// set to 0 to never disable
102
120
103
121
#
define ACCESS_POINT_NAME " [email protected] "
104
- #define ACCESS_POINT_PASSWORD " 192.168.4.1"
105
- // ACCESS_POINT_IP 192.168.4.1
106
122
/*
107
123
Section 7.3.2.1 of the 802.11-2007 specification
108
124
http://standards.ieee.org/getieee802/download/802.11-2007.pdf
109
125
defines a valid SSID as 0-32 octets with arbitrary contents.
110
126
*/
127
+ #define ACCESS_POINT_PASSWORD " 192.168.4.1"
128
+ // TODO: Make it respond to ALL ip addresses when in Admin mode or
129
+ // pop up a web page automatically on connection ala sign in to WiFi pages.
130
+ // ACCESS_POINT_IP 192.168.4.1
111
131
112
132
113
133
#include < ESP8266WiFi.h>
114
134
// #include <WiFiClient.h>
115
- // #include <ESP8266WebServer.h>
116
135
#include < ESP8266mDNS.h>
117
136
#include < ESPAsyncTCP.h>
118
137
// https://github.com/me-no-dev/AsyncTCP is required by:
119
138
#include < ESPAsyncWebServer.h>
120
139
// https://github.com/me-no-dev/ESPAsyncWebServer
121
140
#include < ESP8266HTTPClient.h>
141
+ // #include <ESP8266WebServer.h> SUCKS!
122
142
123
143
#include < Ticker.h>
124
144
#include < EEPROM.h>
0 commit comments