From 967de867df1ea24e1d99ed81be20e42b7bda1e17 Mon Sep 17 00:00:00 2001 From: Robin Strand Prestmo Date: Wed, 29 Oct 2025 10:13:14 +0100 Subject: [PATCH] =?UTF-8?q?Fikset=20feil,=20s=C3=A5=20bil=20kj=C3=B8rer=20?= =?UTF-8?q?fra=20minnet=20n=C3=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/src/main.py | 4 +++- py/src/robot.py | 12 ++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/py/src/main.py b/py/src/main.py index 6df6a53..0e09bfc 100644 --- a/py/src/main.py +++ b/py/src/main.py @@ -15,7 +15,9 @@ except Exception as e: ev3 = EV3Brick() - ev3.screen.print("Failed to import: ", e) + ev3.screen.print("Failed to import: ") + while True: + wait(50) # This program requires LEGO EV3 MicroPython v2.0 or higher. diff --git a/py/src/robot.py b/py/src/robot.py index 9342b91..0d132c3 100644 --- a/py/src/robot.py +++ b/py/src/robot.py @@ -18,9 +18,17 @@ def __init__(self, drive: Drive, sensors: Sensors): def start(self): self.drive.forward(50) - pass + while True: + wait(50) + this.stop() def stop(self): self.drive.forward(0) - pass + def turn_left(self): + self.drive.turn(50, 90) + + + def turn_right(self): + self.drive.turn(50, -90) +