📜  gpio 0 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:49.911000             🧑  作者: Mango

代码示例3
from gpiozero import LED, MotionSensor, LightSensor
from gpiozero.tools import booleanized, all_values
from signal import pause

garden = LED(17)
motion = MotionSensor(4)
light = LightSensor(5)

garden.source = all_values(booleanized(light, 0, 0.1), motion)

pause()