Skip to content

Commit 8af64bc

Browse files
committed
docs/esp8266/tutorial: Update pins tutorial to reflect changes in API.
1 parent 5036b6a commit 8af64bc

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/esp8266/tutorial/pins.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ it. To make an input pin use::
1616

1717
>>> pin = machine.Pin(0, machine.Pin.OUT, machine.Pin.PULL_UP)
1818

19-
You can either use PULL_UP or PULL_NONE for the input pull-mode. If it's
20-
not specified then it defaults to PULL_NONE. You can read the value on
21-
the pin using::
19+
You can either use PULL_UP or None for the input pull-mode. If it's
20+
not specified then it defaults to None, which is no pull resistor.
21+
You can read the value on the pin using::
2222

2323
>>> pin.value()
2424
0
@@ -61,8 +61,8 @@ Next we will create two pins and configure them as inputs::
6161
An finally we need to tell the pins when to trigger, and the function to call
6262
when they detect an event::
6363

64-
>>> p0.irq(Pin.IRQ_FALLING, callback)
65-
>>> p2.irq(Pin.IRQ_RISING | Pin.IRQ_FALLING, callback)
64+
>>> p0.irq(trigger=Pin.IRQ_FALLING, handler=callback)
65+
>>> p2.irq(trigger=Pin.IRQ_RISING | Pin.IRQ_FALLING, handler=callback)
6666

6767
We set pin 0 to trigger only on a falling edge of the input (when it goes from
6868
high to low), and set pin 2 to trigger on both a rising and falling edge. After

0 commit comments

Comments
 (0)