Open FinnThom opened 2 years ago
#!/usr/bin/env pybricks-micropython
from pybricks.ev3devices import InfraredSensor, Motor, ColorSensor
from pybricks.parameters import Port, Button, Color, ImageFile, SoundFile, Stop
from pybricks.tools import wait
from pybricks.robotics import DriveBase
from pybricks.hubs import EV3Brick
# Initialize the EV3 Brick.
ev3 = EV3Brick()
# Initialize the motors.
motor = Motor(Port.C)
while True:
motor.run(speed)
I tried using SpeedRPM with run_forever, but I can't figure out what the code should look like.