pi2go.py 文件源码

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

项目:ropi 作者: ThumbGen 项目源码 文件源码
def leftCounterOld(channel):
    global leftCount, lastL, intCountL
    intCountL += 1
    val = GPIO.input(lineLeft)
    time.sleep(0.02)
    if val == GPIO.input(lineLeft) and val != lastL:
        leftCount -= 1
        lastL = val
        if leftCount <= 0:
            p.ChangeDutyCycle(0)
            q.ChangeDutyCycle(0)
            GPIO.remove_event_detect (channel)
            print "Done left", intCountL
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号