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")
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)
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)
def move_stop(): pc.analog_write(speed_left_pin, 0) pc.analog_write(speed_right_pin, 0)