pi2go.py 文件源码

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

项目:ropi 作者: ThumbGen 项目源码 文件源码
def stepForwardOld(speed, stepsL, stepsR):
    # TODO don't allow nested call backs
    global leftCount, rightCount, intCountL, intCountR
    GPIO.add_event_detect(lineRight, GPIO.BOTH, callback=rightCounter, bouncetime=5)
    GPIO.add_event_detect(lineLeft, GPIO.BOTH, callback=leftCounter, bouncetime=5)
    leftCount = stepsL
    rightCount = stepsR
    lastL = 0
    lastR = 0
    intCountL = 0
    intCountR = 0
#    turnForward(speed, int (speed * stepsR / stepsL))
    forward(speed)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号