diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-05-31 22:57:11 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-06-02 21:08:23 +0300 |
commit | 22ca5390f7ec55400bd55cec5e52fc6c704f8be7 (patch) | |
tree | b8258858191d1d912bc25e3d56bd0cd3a674a9b6 /docs | |
parent | 7400d88762570b110d70752dea741fbca778818c (diff) | |
download | micropython-22ca5390f7ec55400bd55cec5e52fc6c704f8be7.tar.gz micropython-22ca5390f7ec55400bd55cec5e52fc6c704f8be7.zip |
docs/esp8266/quickref: Polish Pin.on()/off() examples.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/esp8266/quickref.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst index 406a5bb456..ccf6365c83 100644 --- a/docs/esp8266/quickref.rst +++ b/docs/esp8266/quickref.rst @@ -107,9 +107,9 @@ Use the :ref:`machine.Pin <machine.Pin>` class:: from machine import Pin p0 = Pin(0, Pin.OUT) # create output pin on GPIO0 - p0.on() # turn on pin, set to high - p0.off() # turn off pin, set to low - p0.value(1) # set pin to high + p0.on() # set pin to "on" (high) level + p0.off() # set pin to "off" (low) level + p0.value(1) # set pin to on/high p2 = Pin(2, Pin.IN) # create input pin on GPIO2 print(p2.value()) # get value, 0 or 1 |