From 272a5d95e040994039eb91830d310339253bcbb9 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 30 May 2017 07:36:25 +0300 Subject: docs/esp8266: Consistently replace Pin.high/low methods with .on/off. --- docs/esp8266/tutorial/repl.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/esp8266/tutorial/repl.rst') 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 ~~~~~~~~~~~~ -- cgit v1.2.3