2017-09-19
md
Another ESP8266 GPIO

The ESP8266 based devices I first obtained were the Wemos D1 mini and the ITEAD Sonoff WiFi switch. Since then, I have come into the possession of a couple of ESP-01 (newer version with 1MB of flash) and some DOIT ESP12F Devkit V3 boards. It seems each time I start a project with the ESP8266, I run into trouble either remembering or choosing the appropriate GPIO pins. It's time to write up what I have learned from my mistakes. By the same token, I would like to thank all those that had carefully explained everything that will be found below.

Table of Contents

  1. Pin Maps
  2. Electrical Characteristics of I/O Pins
  3. State of I/O Pins at Start Up
  4. Types of I/O Connections
  5. The Simple I/O Pins

  1. Pin Maps
  2. General SPI HSPI
    GPIO NO. Pin NO. Pin Name SDIO (master/slave) (slave) I2C I2S UART PWM IR
    0 15 GPIO0_U SPICS2
    1 26 U0TXD_U SPICS1 U0TXD
    2 14 GPIO2_U I2C_SDA I2SO_WS U1TXD
    3 25 U0RXD_U I2SO_DATA U0RXD
    4 16 GPIO4_U PWM3
    5 24 GPIO5_U IR Rx
    6 21 SD_CLK_U SDIO_ICLK SPICLK
    7 22 SD_DATA0_U SDIO_DATA0 SPIQ/MISO
    8 23 SD_DATA1_U SDIO_DATA1 SPID/MOSI U1RXD
    9 18 SD_DATA2_U SDIO_DATA2 SPIHD
    10 19 SD_DATA3_U SDIO_DATA3 SPIWP
    11 20 SD_CMD_U SDIO_CMD
    12 10 MTDI_U HSPID/MOSI I2SI_DATA U0CTS PWM0
    13 12 MTCK_U HSPIQ/MISO I2SI_BCK
    14 9 MTMS_U HSPICLK I2C_SCL I2SI_WS PWM2 IR Tx
    15 13 MTDO_U HPSICS I2SO_BKC U0RTS PWM1
    16 XPD_DCDC
    ref : ESP8266 Technical Reference, Espressif (2017.05) pp 1-6
    NodeMCU WeMos DOIT
    GPIO ESP-01 Sonoff Devkit 1.0 D1 mini Devkit V3
    0 H5 Switch D3 D3 ~D3 pulled high (1)
    1 H2 H3 D10 D10 ~D10 TXD0 (2)
    2 H3 D4 D4 ~D4 pulled high (1)
    3 H7 H2 D9 D9 ~D9 RXD0 (2)
    4 D2 D2 ~D2
    5 D1 D1 ~D1
    10 SD3 (3)
    12 Relay D6 D6 ~D6
    13 LED D7 D7 ~D7
    14 H5 D5 D5 ~D5
    15 D8 D8 ~D8 pulled low (1)
    16 D0 D0 D0 limited 4
    Total 4 11 11 12
    (1)The NodeMCU type boards have pull up and pull down resistors to ensure that the ESP8266 boots from flash memory by default. They are not on board the ESP-01 and must be added.
    (2)GPIO 1 and 3 cannot be used if serial communication with the ESP8266 UART0 is opened.
    (3)Normally SD3 should be used as a data line to the serial memory chip. It seems that is is not connected on the Geekcreit board. Hence GPIO 10 is available at least on the ESP-12F version 3 of the board.
    (4)GPIO 16 has limited capabilities and must be connected to RST to wake from a deep sleep.

  3. Electrical Characteristics of I/O Pins
  4. The following table, pulled from a recent Espressif document, gives the electrical characteristics of the ESP8266EX with reference to a working voltage for the device.

    Source: Espressif (2017.04) ESP8266EX Datasheet, Version 5.4, p.19

    Any voltage less than 1/4 of the working voltage applied to an input pin is read as a logical 0 (LOW in Arduino). To be interpreted as a logical 1 (HIGH) the input voltage must be at least 3/4 of the working voltage. When an input voltage is between 1/4 and 3/4 of the working voltage then the ESP will report something, a HIGH or LOW value, but there is no guarantee as to which. So input voltage to a digital input pin should never be in that range.

    On the output side, a pin set to LOW will never have a voltage above 1/10th of the working voltage. Similarly, if the pin is set HIGH, its voltage will not sink below 8/10th of the working voltage. The tighter range on the output side compared to the input side makes sense if you think about. Just imagine the possibilities if the ranges were inversed.

    Assuming a 3.3 V working voltage, these values work out to be:

    ValueMinMaxUnits
    Logical 0Input-0.30.825V
    Output00.33V
    Logical 1Input2.483.6V
    Output2.643.3V

    According to the table, the stated maximum current available from an output pin is 12 milli-amperes (mA). I measured 27 mA flowing through a grounded LED connected to GPIO 0 when the latter was set HIGH on the DOIT development board. The same pin, when set to LOW, could sink 18.5 mA through an LED connected to 3.3V. It seems wise to add current limiting resistors. Using 390 ohms resistors, the current was a bit less than 4 mA and I found that red and yellow LEDs shone brightly enough.

    Internal, weak pull up resistors can be activated on all GPIO pins when used as inputs except for GPIO 16 which has a weak pull down resistor. I did a cursory search of the Espressif documents and could not find the value of these resistors, but according to an answer by Espressif_Kelly on the topic of Pull up resistors on the company forum, they have a value between 30K and 100K ohms.

  5. State of I/O Pins at Start Up
  6. As one would expect, all of the GPIO pins are set in a defined state whenever the ESP8266 is powered up and reset. Otherwise it could be very messy, just imagine using the ESP to control a device such as a CNC machine that could randomly start cutting when powered up. As a rule, when the ESP8266 is powered up or reset, the GPIO pins are set in input mode and the pull-up resistors are activated. There is one exception, GPIO 16, which is set to output mode and its pull-down resistor is enabled. (The source of this information is the ESP8266 Pin List a spreadsheet from Espressif. The term "oe=1" means that output mode is enabled while "oe=0" means that input mode is enabled (output mode not enabled). The terms "wpu" and "wpd" stand for weak pull-up resistor and weak pull-down resistor according to some but others say that the "w" is for wake up.

    According to the manufacturer's documentation, GPIO pins 0, 2 and 15 are read by the ESP8266 when powered up or reset to determine how the chip will boot:

    GPIO15GPIO0GPIO2DeviceDescription
    001UARTDownload code from UART (programming)
    011FlashBoot from code in SPI Flash memory (normal)
    1xxSDIOBoot from SD-card (?)

    I place the question mark for the third option because I do not know what it means. Whatever it is, that mode is enabled by putting GPIO 15 high. So for normal operation or for flashing the ESP, GPIO 15 must be grounded. By default, GPIO 0 and 2 should be set high, so that the ESP8266 will boot in normal mode, executing the program it finds in flash memory. As I said, as a rule the GPIO pins are in input mode at start up and reading each of them should yield a HIGH except for pins 15 and 16. Things are not quite that simple. Take a look at the following table from the forum reply by Espressif_Kelly.

    I was a bit surprised to see a fourth pin with a desired level at starup. I checked with the DOIT V3 board and it will not boot if GPIO 1 (labelled TX on the board - it is the transmit line of UART0) is grounded. The pin can be left floating or set to high. That prompted me to check the other pins and this is what I found.

    Normal operation   Flashing
    GPIOBoard GPIOBoard
    PinValuePinValue PinValuePinValue
    01D31/f 00D30/f
    11TX1/f 11TXf
    21D41/f 21D41/f
    3-RX- 3-RXf
    4-D2- 4-D2-
    5-D1- 5-D1-
    10-SD3- 10-SD3-
    12-D6- 12-D6-
    13-D7- 13-D7-
    14-D5- 14-D5-
    150D80/f 150D80/f
    16-D0- 16-D0-
    Legend:1HIGH
    0LOW
    -Does not matter, can be LOW, HIGH or floating
    1/fCan be HIGH or floating but not LOW
    0/fCan be LOW or floating but not HIGH

    It is necessary to distinguish among the pins on the ESP8266EX chip, the pins on the ESP12-XX module which is the small board hosting the ESP chip, and the pins on the development board because connections are not direct. Board pins eventually get to the ESP8266EX pins but there is supplementary circuitry, such as switches, LEDs, resistors, and capacitors. The USB TTL transceiver also connected to the chip. That is why D3 can be left floating, there is a 10K pull up resistor on the development board that ensures that GPIO 0 is normally high at start up. One of the TTL control lines from the CH340G, (DTR or DTS I don't know which) is also connected to GPIO 0 and is set low to upload a new sketch into the flash memory.

    As the table shows, there is chatter over the UART0 and UART1 transmit pins (GPIO 1 and GPIO 2) as the ESP goes through its start up routine. That is quite understandable, debug information is being transmitted over both UART which necessarily means these pins are put in output mode. In addition the clock signal is initially sent out through GPIO 0 ("after reset, the default is function5 to export the clock", ESP8266 Pin List Reg and Strapping sheets).

    I was a bit curious about this and decided to investigate further with sophisticated test equipment sparing no expense as you can appreciate by looking at the schematic.

    probes

    To improve the accuracy of the test, the room was darkened to better spot if an LED flickered. Here is what I found, again with the DOIT V3 board.

    GPIO PinNodeMCU LabelChatter
    0D3yes
    1TXyes
    2D4yes
    3RXno
    4D2no
    5D1no
    10SD3?
    12D6no
    13D7no
    14D5no
    15D8no
    16D0no

    Where I indicated there was chatter, there is no doubt. For the other pins all I can say with certainty is that I did not see any flickering and I am relying on the above to affirm there is no chatter on the other pins. I will mention a March 2016 blog from Zoetrope labs titled ESP8266 Bootloader Modes and GPIO state on Startup that shows the GPIO 0 output for the first 140 ms after start up on an oscilloscope. The claimed signal of 350 Hz does not square with the idea that the system clock is being fed through the pin. See the comment by bigblen who says he measured a 26 Mhz signal on the pin which makes more sense. He also mentions the serial output on GPIO 1 and 2.

    Eventually, the ESP8266 Arduino core puts all GPIO pins in input mode enabling the active pull up resistors before turning over control to the setup() portion of a sketch. Well almost all. It turns out that the core does not touch GPIO 9 and 10 which would normally be used to communicate with the flash memory over a quad input output SPI bus. On the DOIT V3 board, the flash is accessed in dual input output mode and GPIO 10 (SD3) is available as an I/O pin. However, it seems that the pin is in output mode with a low value.

    Reading the values of all the GPIO pins in the setup() part of a sketch that does not open the serial port, this is what I get.

    GPIO PinNodeMCU LabelValue
    0D3HIGH
    1TXHIGH
    2D4HIGH
    3RXHIGH
    4D2HIGH
    5D1LOW
    10SD3LOW
    12D6HIGH
    13D7HIGH
    14D5HIGH
    15D8LOW
    16D0HIGH
    Zoetrope labs: When choosing GPIO pins to use, it’s best to avoid GPIO 0, 2 and 15 unless absolutely necessary.

  7. Types of I/O Connections
  8. Distinguish between two types of inputs is useful. One measures a steady state, that may change every now and then. Think of a wall switch (but of course, you would never connect a mains switch to a micro-controller input pin that can only accept at most 3.3V DC). The other type of input is pulsed meaning the incoming signal is normally high and occasionally it will be pulsed low. Think of a non latching push switch like a reset button. Actually, the polarity could be inverted, and the incoming line could be normally low and occasionally be pulsed high. Electrically, these types of inputs are really equivalent: The difference is in what can be expected when the microcontroler is powered up. It would not do to connect a steady state input to pin GPIO 0. If the state happened to be low when the ESP8266 is powered, the latter will not boot in normal mode and most likely boot in programming mode. But the tactile switch that protrudes from the top of the Sonoff WiFi switch is connected to GPIO 0 of the ESP8266. Normally, that button is not depressed when the device is powered up and the Sonoff can operate normally. Once the Sonoff is up and running then the button can be used to toggle the state of the relay manually. So looking at the table seen before GPIO 0 - normally high, active low pulsed input GPIO 1 - any input GPIO 2 - normally high, active low pulsed input GPIO 3 - GPIO GPIO 9(10?) - no GPIO 15 - normally low, active high pulsed input Clearly, the https://www.itead.cc/wiki/images/f/ff/Sonoff-Schematic.pdf http://henrysbench.capnfatz.com/henrys-bench/arduino-projects-tips-and-more/esp8266-esp-01-pin-outs-and-schematics/ https://www.mjt.me.uk/posts/esp8266-gpio-deep-sleep-and-reset/ Olimex uses jumper to set the state of these three pins. https://www.olimex.com/Products/IoT/MOD-WIFI-ESP8266/resources/MOD-WIFI-ESP8266_jumper_reference.pdf https://github.com/OLIMEX/ESP8266/blob/master/HARDWARE/MOD-WIFI-ESP8266-DEV/MOD-WIFI-ESP8266-DEV_schematic.pdf https://github.com/esp8266/esp8266-wiki/wiki/Boot-Process https://zoetrope.io/tech-blog/esp8266-bootloader-modes-and-gpio-state-startup/ https://www.reddit.com/r/esp8266/comments/4d4qsl/gpios_high_during_boot/ problems with using GPIO2 as input https://iot-playground.com/?id=36:esp8266-door-window-sensor-nodemcu-lua-no-arduino

    ESP8266 GPIO Tests (version 000002)
    Loaded current configuration from flash memory (version 1)
    HTTP server started on port 80 of 192.168.4.1 and 0.0.0.0
    Flash chip ID: 1458400 (0x1640e0)
      - manufacturer id: 224 (0xe0)
      - part id 4016
    Flash chip real size: 4194304
    Flash chip size: 4194304
    Flash chip speed: 40000000
    Flash chip mode: DIO (2)
    setup() completed with board NodeMCU v1.0
    Command="board"
    Current board is NodeMCU v1.0
    Command="read all"
    GPIO 0 = HIGH
    GPIO 1 = HIGH
    GPIO 2 = HIGH
    GPIO 3 = HIGH
    GPIO 4 = HIGH
    GPIO 5 = HIGH
    GPIO 12 = HIGH
    GPIO 13 = HIGH
    GPIO 14 = HIGH
    GPIO 15 = LOW
    GPIO 16 = HIGH
    
    Command="mode all out"
    All GPIO pins mode set to OUTPUT
    Command="read all"
    GPIO 0 = LOW
    GPIO 1 = LOW
    GPIO 2 = LOW
    GPIO 3 = LOW
    GPIO 4 = LOW
    GPIO 5 = LOW
    GPIO 12 = LOW
    GPIO 13 = LOW
    GPIO 14 = LOW
    GPIO 15 = LOW
    GPIO 16 = LOW
    
    Command="write all high"
    All GPIO pins set to HIGH
    Command="read all"
    GPIO 0 = HIGH
    GPIO 1 = HIGH
    GPIO 2 = HIGH
    GPIO 3 = HIGH
    GPIO 4 = HIGH
    GPIO 5 = HIGH
    GPIO 12 = HIGH
    GPIO 13 = HIGH
    GPIO 14 = HIGH
    GPIO 15 = HIGH
    GPIO 16 = HIGH
    
    Command="write all low"
    All GPIO pins set to LOW
    Command="read all"
    GPIO 0 = LOW
    GPIO 1 = LOW
    GPIO 2 = LOW
    GPIO 3 = LOW
    GPIO 4 = LOW
    GPIO 5 = LOW
    GPIO 12 = LOW
    GPIO 13 = LOW
    GPIO 14 = LOW
    GPIO 15 = LOW
    GPIO 16 = LOW
    
    Command="mode all in"
    All GPIO pins mode set to INPUT
    Command="read all"
    GPIO 0 = HIGH
    GPIO 1 = HIGH
    GPIO 2 = HIGH
    GPIO 3 = HIGH
    GPIO 4 = LOW
    GPIO 5 = LOW
    GPIO 12 = LOW
    GPIO 13 = LOW
    GPIO 14 = LOW
    GPIO 15 = LOW
    GPIO 16 = LOW
    
    Command="write all low"
    All GPIO pins set to LOW
    Command="read all"
    GPIO 0 = HIGH
    GPIO 1 = HIGH
    GPIO 2 = HIGH
    GPIO 3 = HIGH
    GPIO 4 = LOW
    GPIO 5 = LOW
    GPIO 12 = LOW
    GPIO 13 = LOW
    GPIO 14 = LOW
    GPIO 15 = LOW
    GPIO 16 = LOW
    
    Command="mode all in+"
    All GPIO pins mode set to INPUT_PULLUP
    Command="read all"
    GPIO 0 = HIGH
    GPIO 1 = HIGH
    GPIO 2 = HIGH
    GPIO 3 = HIGH
    GPIO 4 = HIGH
    GPIO 5 = HIGH
    GPIO 12 = HIGH
    GPIO 13 = HIGH
    GPIO 14 = HIGH
    GPIO 15 = LOW
    GPIO 16 = LOW
    
    
    mod
    
    
    

  9. GPIO Outputs
  10. Time to see just what GPIO pins are available on the V3 board. As a first step, I confirmed with a VOM that the GPIO 9 and 10 pins of the ESP-12F module were connected to the SD2 and SD3 pins of the development board. So I wrote a sketch that will put any selected pin in output mode and toggle its value between 0V and 3.3V. It is a generalized Blinky with run-time setting of the output pin to use. All I had to do was to probe the chosen pin with an LED connected to ground through a 330 ohms resistor if I wanted to run the tested pin as an active high output. To see if the pin could act as an active low output, then connect the LED to 3.3V through the resistor.

    schematic

    Here is what I found.

    1. D0 to D8 can be used as output pins.
    2. D9 and D10 can be used as output pins as long as UART 0 is not being used (the Arduino IDE serial monitor connects to UART 0).
    3. SD3 can be used as an output pin.
    4. SD2 can not be used as an output pin.
    These results apply no matter if the output pin is active low or active high.

    Simply configuring SD2 as an output stops the program dead, but surprisingly it seems that SD3 can be used as an output pin. A simple test (command eeprom in the sketch) confirmed that the flash memory could be written and read when the pin is set high or low.

    The test showed that D4 (GPIO 2) is connected to the LED on the ESP-12F module. It uses reverse logic just like the built in LED of the development board which is connected to D0. So when testing D4, three LEDS will flash in unison.

  11. GPIO Inputs
  12. Checking if the pins can be used as inputs is marginally more complicated. I use a normally open tactile switch to present either a low or high value to a GPIO pin when the switch is pressed. A pull-up or pull-down resistor provides the opposite signal when the switch is open. The built in LED will reflect the state of the pin being tested.

    schematic

    Here is what I found with the active low signal and using 4.7K external resistor to pull the signal up when the switch is open.

    1. D0 to D8 can be used as input pins.
    2. D9 and D10 can be used as input pins as long as UART 0 is not being used (the Arduino IDE serial monitor connects to UART 0).
    3. SD3 can be used as an input pin.
    4. SD2 can not be used as an input pin.
    Furthermore, the results are the same if the external resistor pulls the signal up when the switch is open and the latter is connected to 3.3V giving an active high signal.

    The ESP has optional internal (weak) pull-up resistors on the I/O pins except for GPIO 16 (D0) which has an optional pull-down resistor. The value of the internal resistor is between 30K and 100K ohms according to the discussion entitled Pull up resistors on the Espressif forum. So I ran the test for an active low signal again without external resistors but enabling the internal resistors.

    1. D0 to D7 can be used as input pins.
    2. D8 can not be used as an input pin; it remains constantly low.
    3. D9 and D10 can be used as input pins as long as UART 0 is not being used (the Arduino IDE serial monitor connects to UART 0).
    4. SD3 can be used as an input pin.
    5. SD2 can not be used as an input pin.

    It is because there is an external 10K ohm pull-down resistor on the development board connected to D8 (GPIO 15) that the latter cannot be used with an active low switch without an external pull-up resistor. The on board external resistor overwhelms the weak internal pull-up resistor and the pin is always low. Actually, we can work this out because the on-board pull-down resistor and the pull-up resistor (built-in or external) form a voltage divisor:

    Assuming a typical working voltage of 3.3V and that the switch was open, the voltage at GPIO 15, Vo, was

       Vo = (3.3 * R2) / (R1 + R2) )
    R2 is 10K, R1 is 30K to 100K when the internal resistor was used, 4.7K when the external resistor was used. Consequently
    Vo = 0.825 V down to 0.3 V  with internal pull-up resistor 30K up to 100K
    Vo = 2.245 V with external 4.7K pull-up resistor
    
    To interpret what these values mean, look at

    The internal pull-up resistor cannot, on its own, bring the GPIO pin to 2.48 volts which is the guaranteed minimum value to obtain a digital HIGH value when reading the pin. Actually, the pin voltage is such that a LOW is guaranteed.

    The external 4.7K resistor does not meet the input high threshold either. Nevertheless, a HIGH was read. It is just that nothing is guaranteed when the a voltage applied to an input pin is between 0.825 and 2.48 volts. To be safer an 3.3K or less external pull-up resistor should be used because then Vo will be at least 2.48 volts.

    In most cases, I suspect that this discussion about using GPIO 15 (D8) to monitor an active low signal is moot. An active low signal means that the input to the pin should normally be high. As explained below, the ESP8266 will not function as usual if it is started with GPIO 15 held high. This does not preclude using GPIO 15 as an input for an active low signal. It does mean that a more complicated circuit will be needed. One possibility is to add a capacitor, creating an R-C circuit to ensure that GPIO 15 will not reach say 1.8 volts before a given interval. A point of departure might be the RC Delay Calculator. Note that the actual circuit would involve the voltage divider created by the on board resistor.

    Another possibility, borrowed from Mathew Ford Using ESP8266 GPIO0/GPIO2/GPIO15 pins. The idea is that the external pull-up resistor is connected to another pin. Only once the ESP8266 has booted up correctly, that pin extra pin, D7 in the figure below is used as an output pin set to high.

    Of course, the astute will ask why not use D7 as an input pin and forget about D8. Clearly, this approach only makes sense if putting D7 high serves another purpose such as turning on an external LED for example.

  13. Input Pins when Starting ESP8266
  14. Three GPIO pins 0, 2 and 15 (or D3, D4 and D8 respectively) are used as inputs and their state is read by the ESP8266 when it is powered up to determine if it is to run in program mode or if it is to boot up from flash memory or from the SD-card. The latter is obviously not the case, according to the followin table, GPIO15 must be grounded when powering up .

    GPIO15GPIO0GPIO2DeviceDescription
    001UARTCode downloaded from UART (programming)
    011FlashBoot from code in SPI Flash (normal)
    1xxSDIOBoot from SD-card

    In order that normal operation be the default behaviour

    GPIO 0 (D3) is pulled high through a 10K ohm resistor. GPIO 2 (D4) is pulled high through a 10K ohm resistor. GPIO 15 (D8) is pulled low through a 10K ohm resistor. The case of D8 has already been examined. GPIO 16 (D0) is connected to 3.3V through a 470 ohm resistor and blue LED; _____ //// 3V3 o----|_____|--->|------o GPIO 16 NOTE: Digital pin 13 is harder to use as a digital input than the other digital pins because it has an LED and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up resistor, it will hang at around 1.7V instead of the expected 5V because the onboard LED and series resistor pull the voltage level down, meaning it always returns LOW. If you must use pin 13 as a digital input, set its pinMode() to INPUT and use an external pull down resistor.

    I should mention the Happy Bison review of ESP8266 modules. It mentions an ESP-12D which does free up the GPIO pins. Is it vapourware? It does not seem to be available from the usual sources.

    /home/michel/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/boards.txt
    nodemcuv2.name=NodeMCU 1.0 (ESP-12E Module)
    
    nodemcuv2.upload.tool=esptool
    nodemcuv2.upload.speed=115200
    nodemcuv2.upload.resetmethod=nodemcu
    nodemcuv2.upload.maximum_size=1044464
    nodemcuv2.upload.maximum_data_size=81920
    nodemcuv2.upload.wait_for_upload_port=true
    nodemcuv2.serial.disableDTR=true
    nodemcuv2.serial.disableRTS=true
    
    nodemcuv2.build.mcu=esp8266
    nodemcuv2.build.f_cpu=80000000L
    nodemcuv2.build.board=ESP8266_NODEMCU
    nodemcuv2.build.core=esp8266
    nodemcuv2.build.variant=nodemcu
    nodemcuv2.build.flash_mode=dio              ----
    nodemcuv2.build.flash_size=4M
    nodemcuv2.build.flash_freq=40
    nodemcuv2.build.debug_port=
    nodemcuv2.build.debug_level=
    

    Fortunately, preliminary tests show that I can confirm that the ESP does start when power is applied to the 5V Vin pin.

    michel@hp:~$ miniterm.py
    
    --- Available ports:
    ---  1: /dev/ttyUSB0         USB2.0-Serial
    --- Enter port index or full name: 1
    --- Miniterm on /dev/ttyUSB0  9600,8,N,1 ---
    --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
    ���������������������������������������봤d�)b␌m,,x,�؊�,$	l␘␐␆c2�l���␎1�Jv���D!�Q��@n�,�������
    > 
    > 
    > o,␛[2~
    stdin:1: unexpected symbol near 'char(27)'
    > print(node.info())
    2	0	0	3708327	1458376	4096	2	40000000