From 6b80ebe32ef57cc3bef1b6309433354181867611 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 9 Mar 2016 13:01:32 +0000 Subject: [PATCH] docs/esp8266: Fix indent errors, typos, and add info about REPL UART. --- docs/esp8266/quickref.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst index 1056122977..6f5913f1c1 100644 --- a/docs/esp8266/quickref.rst +++ b/docs/esp8266/quickref.rst @@ -12,6 +12,7 @@ The Adafruit Feather HUZZAH board (image attribution: Adafruit). General board control --------------------- +The MicroPython REPL is on UART0 (GPIO1=TX, GPIO3=RX) at baudrate 115200. Tab-completion is useful to find out what methods an object has. Paste mode (ctrl-E) is useful to paste a large slab of Python code into the REPL. @@ -53,14 +54,14 @@ A useful function for connecting to your local WiFi network is:: def do_connect(): import network - wlan = network.WLAN(wlan.STA_IF) + wlan = network.WLAN(network.STA_IF) wlan.active(True) if not wlan.isconnected(): print('connecting to network...') - wlan.connect('essid', 'password') - while not wlan.isconnected(): - pass - print('network config:', wlan.ifconfig()) + wlan.connect('essid', 'password') + while not wlan.isconnected(): + pass + print('network config:', wlan.ifconfig()) Once the network is established the ``socket`` module can be used to create and use TCP/UDP sockets as usual. @@ -189,6 +190,8 @@ The I2C driver is implemented in software and works on all pins:: i2c.writeto(0x3a, buf, stop=False) # don't send a stop bit after writing +Note that reading is not yet implemented. + OneWire driver --------------