summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266/tutorial
diff options
context:
space:
mode:
Diffstat (limited to 'docs/esp8266/tutorial')
-rw-r--r--docs/esp8266/tutorial/intro.rst4
-rw-r--r--docs/esp8266/tutorial/onewire.rst6
-rw-r--r--docs/esp8266/tutorial/pins.rst2
3 files changed, 8 insertions, 4 deletions
diff --git a/docs/esp8266/tutorial/intro.rst b/docs/esp8266/tutorial/intro.rst
index 8c356b913f..32e9326b37 100644
--- a/docs/esp8266/tutorial/intro.rst
+++ b/docs/esp8266/tutorial/intro.rst
@@ -135,6 +135,10 @@ after it, here are troubleshooting recommendations:
rate may be too high and lead to errors. Try a more common 115200 baud
rate instead in such cases.
+* If lower baud rate didn't help, you may want to try older version of
+ esptool.py, which had a different programming algorithm::
+ pip install esptool==1.0.1
+
* The ``--flash_size`` option in the commands above is mandatory. Omitting
it will lead to a corrupted firmware.
diff --git a/docs/esp8266/tutorial/onewire.rst b/docs/esp8266/tutorial/onewire.rst
index c90044b7a8..c2cede9e38 100644
--- a/docs/esp8266/tutorial/onewire.rst
+++ b/docs/esp8266/tutorial/onewire.rst
@@ -6,19 +6,19 @@ The 1-wire bus is a serial bus that uses just a single wire for communication
is a very popular 1-wire device, and here we show how to use the onewire module
to read from such a device.
-For the following code to work you need to have at least one DS18B20 temperature
+For the following code to work you need to have at least one DS18S20 or DS18B20 temperature
sensor with its data line connected to GPIO12. You must also power the sensors
and connect a 4.7k Ohm resistor between the data pin and the power pin. ::
import time
import machine
- import onewire
+ import onewire, ds18x20
# the device is on GPIO12
dat = machine.Pin(12)
# create the onewire object
- ds = onewire.DS18B20(onewire.OneWire(dat))
+ ds = ds18x20.DS18X20(onewire.OneWire(dat))
# scan for devices on the bus
roms = ds.scan()
diff --git a/docs/esp8266/tutorial/pins.rst b/docs/esp8266/tutorial/pins.rst
index 639267d2ee..a44f40d3a7 100644
--- a/docs/esp8266/tutorial/pins.rst
+++ b/docs/esp8266/tutorial/pins.rst
@@ -14,7 +14,7 @@ Here, the "0" is the pin that you want to access. Usually you want to
configure the pin to be input or output, and you do this when constructing
it. To make an input pin use::
- >>> pin = machine.Pin(0, machine.Pin.OUT, machine.Pin.PULL_UP)
+ >>> pin = machine.Pin(0, machine.Pin.IN, machine.Pin.PULL_UP)
You can either use PULL_UP or None for the input pull-mode. If it's
not specified then it defaults to None, which is no pull resistor.