summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266
diff options
context:
space:
mode:
Diffstat (limited to 'docs/esp8266')
-rw-r--r--docs/esp8266/quickref.rst4
-rw-r--r--docs/esp8266/tutorial/pins.rst4
-rw-r--r--docs/esp8266/tutorial/repl.rst9
3 files changed, 9 insertions, 8 deletions
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst
index 5ff33e02bd..406a5bb456 100644
--- a/docs/esp8266/quickref.rst
+++ b/docs/esp8266/quickref.rst
@@ -107,8 +107,8 @@ Use the :ref:`machine.Pin <machine.Pin>` class::
from machine import Pin
p0 = Pin(0, Pin.OUT) # create output pin on GPIO0
- p0.high() # set pin to high
- p0.low() # set pin to low
+ p0.on() # turn on pin, set to high
+ p0.off() # turn off pin, set to low
p0.value(1) # set pin to high
p2 = Pin(2, Pin.IN) # create input pin on GPIO2
diff --git a/docs/esp8266/tutorial/pins.rst b/docs/esp8266/tutorial/pins.rst
index a44f40d3a7..cd45c83cd3 100644
--- a/docs/esp8266/tutorial/pins.rst
+++ b/docs/esp8266/tutorial/pins.rst
@@ -35,8 +35,8 @@ Then set its value using::
Or::
- >>> pin.low()
- >>> pin.high()
+ >>> pin.off()
+ >>> pin.on()
External interrupts
-------------------
diff --git a/docs/esp8266/tutorial/repl.rst b/docs/esp8266/tutorial/repl.rst
index 21e889c9a8..ba64fcccbe 100644
--- a/docs/esp8266/tutorial/repl.rst
+++ b/docs/esp8266/tutorial/repl.rst
@@ -101,11 +101,12 @@ turn it on and off using the following code::
>>> import machine
>>> pin = machine.Pin(2, machine.Pin.OUT)
- >>> pin.high()
- >>> pin.low()
+ >>> pin.on()
+ >>> pin.off()
-Note that ``high`` might turn the LED off and ``low`` might turn it on (or vice
-versa), depending on how the LED is wired on your board.
+Note that ``on`` method of a Pin might turn the LED off and ``off`` might
+turn it on (or vice versa), depending on how the LED is wired on your board.
+To resolve this, machine.Signal class is provided.
Line editing
~~~~~~~~~~~~