steppertest.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:rpi-film-capture 作者: jphfilm 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号