Exemplo n.º 1
0
def loop():
    while True:
        pcduino.analog_write(speed_pin_1, 200)
        pcduino.digital_write(pin_forback, pcduino.HIGH)
        pcduino.digital_write(pin_go, pcduino.LOW)
        time.sleep(1)
        print("looped")
Exemplo n.º 2
0
def move_right_forward(speed):
    pc.analog_write(speed_right_pin, speed)
    pc.digital_write(right_forward_pin, pc.HIGH)
    pc.digital_write(right_backward_pin, pc.LOW)
Exemplo n.º 3
0
def move_left_backward(speed):
    pc.analog_write(speed_left_pin, speed)
    pc.digital_write(left_forward_pin, pc.LOW)
    pc.digital_write(left_backward_pin, pc.HIGH)
Exemplo n.º 4
0
def move_stop():
    pc.analog_write(speed_left_pin, 0)
    pc.analog_write(speed_right_pin, 0)