first commit

This commit is contained in:
gaohz committed 2024-06-06 04:13:43 +00:00
commit b8768c3ff8
249 files changed
+38439

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import wiringpi
PIN_TO_SENSE = 23
def gpio_callback():
print "GPIO_CALLBACK!"
wiringpi.wiringPiSetupGpio()
wiringpi.pinMode(PIN_TO_SENSE, wiringpi.GPIO.INPUT)
wiringpi.pullUpDnControl(PIN_TO_SENSE, wiringpi.GPIO.PUD_UP)
wiringpi.wiringPiISR(PIN_TO_SENSE, wiringpi.GPIO.INT_EDGE_BOTH, gpio_callback)
while True:
wiringpi.delay(2000)