使用Python与树莓派GPIO API控制针脚电平
import time import Rpi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(18,GPIO.OUT) while True: GPIO.output(18,GPIO.HIGH) time.sleep(.5) GPIO.output(18,GPIO.LOW) time.sleep(.5)
使用Python与树莓派GPIO API控制针脚电平
import time import Rpi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(18,GPIO.OUT) while True: GPIO.output(18,GPIO.HIGH) time.sleep(.5) GPIO.output(18,GPIO.LOW) time.sleep(.5)