From 3217bbe4910416b9084691ea5ff1ec1530e15ee4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 7 Feb 2017 16:58:43 +1100 Subject: docs/esp8266/tutorial: Specify the baudrate in picocom example command. --- docs/esp8266/tutorial/repl.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/esp8266/tutorial/repl.rst') diff --git a/docs/esp8266/tutorial/repl.rst b/docs/esp8266/tutorial/repl.rst index 1922da128..21e889c9a 100644 --- a/docs/esp8266/tutorial/repl.rst +++ b/docs/esp8266/tutorial/repl.rst @@ -24,7 +24,7 @@ terminal programs that will work, so pick your favourite! For example, on Linux you can try running:: - picocom /dev/ttyUSB0 + picocom /dev/ttyUSB0 -b115200 Once you have made the connection over the serial port you can test if it is working by hitting enter a few times. You should see the Python REPL prompt, -- cgit v1.2.3 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/quickref.rst | 4 ++-- docs/esp8266/tutorial/pins.rst | 4 ++-- docs/esp8266/tutorial/repl.rst | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'docs/esp8266/tutorial/repl.rst') diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst index 5ff33e02b..406a5bb45 100644 --- a/docs/esp8266/quickref.rst +++ b/docs/esp8266/quickref.rst @@ -107,8 +107,8 @@ Use the :ref:`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 a44f40d3a..cd45c83cd 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 21e889c9a..ba64fcccb 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