Raspberry Pi- GPIO Events in Python

前端 未结 4 973
暗喜
暗喜 2020-12-13 10:47

I am using the GPIO pins on my Raspberry Pi with a PIR sensor to detect motion. When the sensor detects motion I want to then move the software onto other functions.

4条回答
  •  粉色の甜心
    2020-12-13 10:57

    Now the RPi GPIO library has inbuilt interrupt driven GPIO control which can happen in separate thread freeing up resources. You may wish to read the following http://raspi.tv/2013/how-to-use-interrupts-with-python-on-the-raspberry-pi-and-rpi-gpio-part-3

提交回复
热议问题