pi2go.py 文件源码

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

项目:ropi 作者: ThumbGen 项目源码 文件源码
def rightCounterOld(channel):
    global rightCount, lastR, intCountR
    intCountR += 1
    val = GPIO.input(lineRight)
    time.sleep(0.02)
    if val == GPIO.input(lineRight) and val != lastR:
        rightCount -= 1
        lastR = val
        if rightCount <= 0:
            a.ChangeDutyCycle(0)
            b.ChangeDutyCycle(0)
            GPIO.remove_event_detect (channel)
            print "Done right", intCountR
# ======== End of Old deprecated functions =========

# End of Motor Functions
#======================================================================


#======================================================================
# RGB LED Functions
# (Full version only)
#
# setLED(LED, Red, Green, Blue): Sets the LED specified to required RGB value. 0 >= LED <= 3; 0 <= R,G,B <= 4095
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号