Skip to content

Fikset feil, så bil kjører fra minnet nå #26

Merged
merged 1 commit into from
Oct 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion py/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 10 additions & 2 deletions py/src/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)