Python rpi GPIO output control based on GPIO input and time of day
问题 I'm trying to write a little script to control two raspberry pi's gpio output pins based on two factors: the state of GPIO.input.17 and the time of day. I would like gpio.output.23 and gpio.output.25 to be low when gpio.input.17 is low. I would like gpio.output.23 to go high when gpio.input.17 is high and the time is between 0700-2159. I would like gpio.output.25 to go high when gpio.input.17 is high and the time is between 2200-0659. so far, the code i've put together looks like this: #!/usr