1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 12:53:22 +00:00

Updating the README to include notes on edge detection and fixing the first line since it wasn't formatted the way I wanted

This commit is contained in:
Robert Wolterman
2016-04-09 10:27:53 -05:00
parent 0e1cf46c4e
commit 6e7dd4984c

View File

@ -1,4 +1,5 @@
# CHIP_IO CHIP_IO
============================
A CHIP GPIO library A CHIP GPIO library
Manual:: Manual::
@ -51,14 +52,17 @@ Polling inputs::
Waiting for an edge (GPIO.RISING, GPIO.FALLING, or GPIO.BOTH:: Waiting for an edge (GPIO.RISING, GPIO.FALLING, or GPIO.BOTH::
This only works for the AP-EINT1, AP-EINT3, and XPO Pins on the CHIP
GPIO.wait_for_edge(channel, GPIO.RISING) GPIO.wait_for_edge(channel, GPIO.RISING)
Detecting events:: Detecting events::
GPIO.add_event_detect("CSID0", GPIO.FALLING) GPIO.setup("XIO-P0", GPIO.IN)
GPIO.add_event_detect("XIO-P0", GPIO.FALLING)
#your amazing code here #your amazing code here
#detect wherever: #detect wherever:
if GPIO.event_detected("CSID0"): if GPIO.event_detected("XIO-P0"):
print "event detected!" print "event detected!"
**PWM**:: **PWM**::