python类HIGH的实例源码

ObstacleRL.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def reverse(t=wheel_pulse):

    gpio.output(reverse_left, gpio.HIGH)
    gpio.output(reverse_right, gpio.HIGH)

    sleep(t)
    gpio.output(reverse_left, gpio.LOW)
    gpio.output(reverse_right, gpio.LOW)
ObstacleRL.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def hard_right(t=wheel_pulse):
    gpio.output(forward_left, gpio.HIGH)
    gpio.output(reverse_right, gpio.HIGH)

    sleep(t)
    gpio.output(forward_left, gpio.LOW)
    gpio.output(reverse_right, gpio.LOW)
ObstacleRLServos.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def forward(t=wheel_pulse):

    gpio.output(forward_right, gpio.HIGH)
    gpio.output(forward_left, gpio.HIGH)

    sleep(t)
    gpio.output(forward_right, gpio.LOW)
    gpio.output(forward_left, gpio.LOW)
MoveBlackRobot.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def forward(self):

        gpio.output(self.forward_right, gpio.HIGH)
        gpio.output(self.forward_left, gpio.HIGH)

        sleep(self.wheel_pulse)
        gpio.output(self.forward_right, gpio.LOW)
        gpio.output(self.forward_left, gpio.LOW)
MoveBlackRobot.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def reverse(self):

        gpio.output(self.reverse_left, gpio.HIGH)
        gpio.output(self.reverse_right, gpio.HIGH)

        sleep(self.wheel_pulse)
        gpio.output(self.reverse_left, gpio.LOW)
        gpio.output(self.reverse_right, gpio.LOW)
MoveBlackRobot.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def hard_right(self):

        gpio.output(self.forward_left, gpio.HIGH)
        gpio.output(self.reverse_right, gpio.HIGH)

        sleep(self.wheel_pulse)
        gpio.output(self.forward_left, gpio.LOW)
        gpio.output(self.reverse_right, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def go_forward(t):

    print('forward')

    gpio.output(right_forward, gpio.HIGH)
    gpio.output(left_forward, gpio.HIGH)

    sleep(t)
    gpio.output(right_forward, gpio.LOW)
    gpio.output(left_forward, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def turn_left(t):

    print('left')
    gpio.output(right_forward, gpio.HIGH)

    sleep(t)
    gpio.output(right_forward, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def turn_right(t):
    print('right')
    gpio.output(left_forward, gpio.HIGH)

    sleep(t)
    gpio.output(left_forward, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def go_backward(t):

    print('reverse')

    gpio.output(right_reverse, gpio.HIGH)
    gpio.output(left_reverse, gpio.HIGH)

    sleep(t)
    gpio.output(right_reverse, gpio.LOW)
    gpio.output(left_reverse, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def reverse_turn_left(t):
    print('reverse left')
    gpio.output(left_reverse, gpio.HIGH)

    sleep(t)
    gpio.output(left_reverse, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def hard_right(t=1.):
    print('hard right')
    gpio.output(left_forward, gpio.HIGH)
    gpio.output(right_reverse, gpio.HIGH)

    sleep(t)
    gpio.output(left_forward, gpio.LOW)
    gpio.output(right_reverse, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def hard_left(t=1.):
    print('hard left')
    gpio.output(right_forward, gpio.HIGH)
    gpio.output(left_reverse, gpio.HIGH)

    sleep(t)
    gpio.output(right_forward, gpio.LOW)
    gpio.output(left_reverse, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def stop1(t=1):
    print('stop1')
    gpio.output(left_forward, gpio.HIGH)
    gpio.output(left_reverse, gpio.HIGH)

    sleep(t)
    gpio.output(left_forward, gpio.LOW)
    gpio.output(left_reverse, gpio.LOW)
testWheels.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def stop2(t=1):
    print('stop2')
    gpio.output(right_forward, gpio.HIGH)
    gpio.output(right_reverse, gpio.HIGH)

    sleep(t)
    gpio.output(right_forward, gpio.LOW)
    gpio.output(right_reverse, gpio.LOW)



# test
testWheels_Individual_4WD.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def forward_rear(t):

    gpio.output(13, gpio.HIGH)
    gpio.output(31, gpio.HIGH)

    sleep(t)
    gpio.output(13, gpio.LOW)
    gpio.output(31, gpio.LOW)
testWheels_Individual_4WD.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def forward_right(t):
    gpio.output(40, gpio.HIGH)
    gpio.output(31, gpio.HIGH)

    sleep(t)
    gpio.output(40, gpio.LOW)
    gpio.output(31, gpio.LOW)
testWheels_Individual_4WD.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def forward_left(t):
    gpio.output(13, gpio.HIGH)
    gpio.output(38, gpio.HIGH)

    sleep(t)
    gpio.output(13, gpio.LOW)
    gpio.output(38, gpio.LOW)
testWheels_Individual_4WD.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def reverse_front(t):

    gpio.output(7, gpio.HIGH)
    gpio.output(36, gpio.HIGH)

    sleep(t)
    gpio.output(7, gpio.LOW)
    gpio.output(36, gpio.LOW)
testWheels_Individual_4WD.py 文件源码 项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def reverse_rear(t):

    gpio.output(15, gpio.HIGH)
    gpio.output(29, gpio.HIGH)

    sleep(t)
    gpio.output(15, gpio.LOW)
    gpio.output(29, gpio.LOW)


问题


面经


文章

微信
公众号

扫码关注公众号