jhyetao
Results
1
issues of
jhyetao
while True: # 下降沿检测 if GPIO.event_detected(GPIOConfig.VOICE_SENSOR): GPIO.remove_event_detect(GPIOConfig.VOICE_SENSOR) handler.worker() GPIO.add_event_detect(GPIOConfig.VOICE_SENSOR, GPIO.FALLING) time.sleep(0.5) 上面代码,为何要用传感器条件来判断,直接循环执行handler.work()不行吗?