Use 3.3V logic, or 5V with protection resistors (10k)
+
Connect Rx and Tx with a piece of wire to test the terminal alone, you should see what you type in the browser.
+ NOTE: This won't work if your ESP8266 board has a built-in USB-serial.
+
+
+
+
+
Screen
+
+
+
Most ANSI escape sequences are supported.
+
The max screen size is 2000 characters (eg. 25x80), default is 10x26. Set using \e]W?;?\a with rows;cols.
+
The screen will automatically scroll, can be used for log output.
+
Display update is sent after 20 ms of inactivity.
+
The browser display needs WebSockets for the real-time updating. It may not work on really old phones / browsers.
+
+
+
+
+
Color Reference
+
+
Color is set using \e[?m or \e[?;?m where "?" are numbers from the following tables:
+
+ Foreground
+
+
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+
+
+
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+
+
+ Background
+
+
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+
+
+
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+
+
+
Bright foreground can also be set using the "bold" attribute 1 (eg. \e[31;1m). For more details, see the ANSI code reference below.
+
+
+
+
User Input
+
+
+ All the user types on their keyboard is sent as-is to the UART, including ESC, ANSI sequences for arrow keys and CR-LF for Enter.
+ The input is limited to ASCII codes 32-126, backspace 8 and tab 9.
+
+
+
The buttons under the screen send ASCII codes 1, 2, 3, 4, 5.
+
+
+ Mouse input (click/tap) is sent as \e?;?M with row;column. You can use this for on-screen buttons, menu navigation etc.
+ Please note this is a custom sequence, not supported by PuTTY or other terminals.
+
+
+
+
+
Supported ANSI Escape Sequences
+
+
Sequences are started by ASCII code 27 (ESC, \e, \x1b, \033)
+
+
Instead of \a (BELL, ASCII 7) in the commands, you can use `\e\` (ESC + backslash). It's the Text Separator code.
+
+
Text Attributes
+
+
+ All text attributes are set using \e[...m where the dots are numbers separated by semicolons.
+ You can combine up to 3 attributes in a single command.
+
+
+
+
+
+
Attribute
+
Meaning
+
+
+
+
+
0
+
Reset text attributes to default
+
+
+
7
+
Inverse (fg/bg swap when printing)
+
+
+
27
+
Inverse OFF
+
+
+
30-37, 90-97
+
Foreground color, normal and bright
+
+
+
40-47, 100-107
+
Background color, normal and bright
+
+
+
+
+
Cursor
+
+
Movement commands scroll the screen if needed. The coordinates are 1-based, origin top left.
+
+
+
+
+
Code
+
Params
+
Meaning
+
+
+
+
+
\e[?A
+
[count]
+
Move cursor up
+
+
+
\e[?B
+
[count]
+
Move cursor down
+
+
+
\e[?C
+
[count]
+
Move cursor forward (right)
+
+
+
\e[?D
+
[count]
+
Move cursor backward (left)
+
+
+
\e[?E
+
[count]
+
Go N line down, start of line
+
+
+
\e[?F
+
[count]
+
Go N lines up, start of line
+
+
+
\e[?G
+
column
+
Go to column
+
+
+
\e[?;?G
+
[row=1];[col=1]
+
Go to row and column
+
+
+
\e[6n
+
--
+
Query cursor position. Position is sent back as \e[?;?R with row;column.
+
+
+
\e[s
+
--
+
Store position
+
+
+
\e[u
+
--
+
Restore position
+
+
+
\e7
+
--
+
Store position & attributes
+
+
+
\e8
+
--
+
Restore position & attributes
+
+
+
\e[?25l
+
--
+
Hide cursor (literal question mark, lowercase L!)
+
+
+
\e[?25h
+
--
+
Show cursor (literal question mark!)
+
+
+
+
+
Screen
+
+
+
+
+
Code
+
Params
+
Meaning
+
+
+
+
+
\e[?J
+
[mode=0]
+
Clear screen. Mode: 0 - from cursor, 1 - to cursor, 2 - all
+
+
+
\e[?K
+
[mode=0]
+
Erase line. Mode: 0 - from cursor, 1 - to cursor, 2 - all
+
+
+
\e[?S
+
[lines]
+
Scroll screen content up, add empty line at the bottom
+
+
+
\e[?T
+
[lines]
+
Scroll screen content down, add empty line at the top
+
+
+
\e]W?;?\a
+
rows;cols
+
Set screen size, maximum 25x80 (resp. total 2000 characters). This also clears the screen.
+
+
+
+
+
System Commands
+
+
+
+
+
Code
+
Params
+
Meaning
+
+
+
+
+
\ec
+
--
+
+ "Device Reset" - clear screen, reset attributes, show cursor & move it to 1,1.
+ The screen size and WiFi settings stay unchanged.
+
+
+
+
\e]FR\a
+
--
+
"Factory Reset", emergency code when you mess up the WiFi, restores SSID to unique default, clears stored credentials & enters Client+AP mode.
+
+
+
\e[5n
+
--
+
Query device status, replies with \e[0n "device is OK". Can be used to check if the UART works.