Skip to content

Commit 96d4065

Browse files
committed
Update Documentation
1 parent 43fa402 commit 96d4065

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
1.0.10
2+
----
3+
* Handle conescript compatible pin names in set_pin_mode function
4+
* Fix segfault caused by PWM.stop on a disabled pwm
5+
* Add pullup/pulldown configuration to GPIO inputs using pinmux
6+
17
1.0.0
28
----
39
* Merge pull request #108 from MatthewWest for PWM support in Linux kernel 4.1+

README.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ Setup the pin for output, and write GPIO.HIGH or GPIO.LOW. Or you can use 1 or 0
7474

7575
**GPIO Input**
7676

77-
Setup the pin for input, and set GPIO.PUD_NONE, GPIO.PUD_DOWN or GPIO.PUD_UP. Or you can use 0, 1 or 2.::
77+
Setup the pin for input, and set GPIO.PUD_OFF, GPIO.PUD_DOWN or GPIO.PUD_UP. Or you can use 0, 1 or 2.::
7878

7979
import Adafruit_BBIO.GPIO as GPIO
80-
GPIO.setup("P8_16", GPIO.IN, GPIO.PUD_UP)
80+
GPIO.setup("P8_16", GPIO.IN, pull_up_down = GPIO.PUD_UP)
8181
print GPIO.input("P8_14")
8282
8383
**On-Board LEDs**
@@ -122,11 +122,15 @@ Waiting for an edge (GPIO.RISING, GPIO.FALLING, or GPIO.BOTH::
122122

123123
Detecting events::
124124

125-
GPIO.add_event_detect("P9_12", GPIO.FALLING)
125+
GPIO.add_event_detect("P9_12", GPIO.FALLING, gpio_event_callback, bouncetime=0)
126126
#your amazing code here
127127
#detect wherever:
128128
if GPIO.event_detected("P9_12"):
129129
print "event detected!"
130+
131+
#or specify callback function
132+
def gpio_event_callback(pin):
133+
print "event detected on", pin
130134

131135
**PWM**::
132136

0 commit comments

Comments
 (0)