标签: python loops delay
Python:我正在编写一个系统,需要程序等待来自覆盆子上的GPIO板的输入然后循环直到输入停止?有关最佳方法的任何想法吗?
答案 0 :(得分:0)
最好的方法是使用RPI.GPIO模块的event_detected()函数。 看看http://raspi.tv/2014/rpi-gpio-update-and-detecting-both-rising-and-falling-edges
示例程序检测GPIO 25上的上升沿和下降沿