1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 04:43:21 +00:00

Updating setup to allow for repeated calls on a pin. Not totally sold on this, but it work and is what RPi.GPIO does. This will close #63

This commit is contained in:
Robert Wolterman
2017-03-20 23:06:09 -05:00
parent 38a34e7edf
commit 2b48571ee3
7 changed files with 31 additions and 4 deletions

View File

@ -225,6 +225,16 @@ Read lots of data::
This code was initially added by brettcvz and I cleaned it up and expanded it.
You can quickly change a pins direction::
GPIO.direction("XIO-P3", GPIO.OUT)
GPIO.direction("XIO-P3", GPIO.IN)
You can also re-setup a pin in order to change direction, not that this is a slower operation::
GPIO.setup("XIO-P3", GPIO.OUT)
GPIO.setup("XIO-P3", GPIO.IN)
The edge detection code below only works for the AP-EINT1, AP-EINT3, and XPO Pins on the CHIP.
Waiting for an edge (GPIO.RISING, GPIO.FALLING, or GPIO.BOTH::