summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266/tutorial
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-05-30 07:36:25 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-05-30 07:36:25 +0300
commit272a5d95e040994039eb91830d310339253bcbb9 (patch)
tree1f8e7575953a8e02d482356ee660a4ed84e4579f /docs/esp8266/tutorial
parentd5b8825d5f5c6110f9cf3bd39848cfe94137d291 (diff)
downloadmicropython-272a5d95e040994039eb91830d310339253bcbb9.tar.gz
micropython-272a5d95e040994039eb91830d310339253bcbb9.zip
docs/esp8266: Consistently replace Pin.high/low methods with .on/off.
Diffstat (limited to 'docs/esp8266/tutorial')
-rw-r--r--docs/esp8266/tutorial/pins.rst4
-rw-r--r--docs/esp8266/tutorial/repl.rst9
2 files changed, 7 insertions, 6 deletions
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
~~~~~~~~~~~~