def pulsetest():
dir=True
for freq in [200, 400, 800, 1000]:
halfpulse=.5/freq
# for j in range(0,i):
logging.debug("start")
for i in range(0,1600):
GPIO.output(pulse_pin, True)
time.sleep(halfpulse)
GPIO.output(pulse_pin, False)
time.sleep(halfpulse)
logging.debug("stop")
dir=not dir
GPIO.output(dir_pin, dir)
time.sleep(.5)
# logging.debug(i)
评论列表
文章目录