docs/esp8266/quickref: Polish Pin.on()/off() examples.

pull/3017/head
Paul Sokolovsky 2017-05-31 22:57:11 +03:00
rodzic 7400d88762
commit 22ca5390f7
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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