diff --git a/.DS_Store b/.DS_Store index dd90b4e..2931f0f 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/dokumenter/prosjektplan-2025-team-13.docx b/dokumenter/prosjektplan-2025-team-13.docx index 1532b9a..594f179 100644 Binary files a/dokumenter/prosjektplan-2025-team-13.docx and b/dokumenter/prosjektplan-2025-team-13.docx differ diff --git a/py/src/.gitignore b/py/src/.gitignore new file mode 100644 index 0000000..00f2d38 --- /dev/null +++ b/py/src/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +*.pyc +.venv/ diff --git a/py/src/.vscode/extensions.json b/py/src/.vscode/extensions.json new file mode 100644 index 0000000..f8f1a44 --- /dev/null +++ b/py/src/.vscode/extensions.json @@ -0,0 +1,13 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": [ + "lego-education.ev3-micropython" + ], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [ + "ms-python.python" + ] +} \ No newline at end of file diff --git a/py/src/.vscode/launch.json b/py/src/.vscode/launch.json new file mode 100644 index 0000000..d933aeb --- /dev/null +++ b/py/src/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Download and Run", + "type": "ev3devBrowser", + "request": "launch", + "program": "/home/robot/${workspaceRootFolderName}/main.py", + "interactiveTerminal": false + } + ] +} diff --git a/py/src/.vscode/settings.json b/py/src/.vscode/settings.json new file mode 100644 index 0000000..b0968c1 --- /dev/null +++ b/py/src/.vscode/settings.json @@ -0,0 +1,7 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.eol": "\n", + "debug.openDebug": "neverOpen", + "python.linting.enabled": false, + "python.languageServer": "None" +} diff --git a/py/src/main.py b/py/src/main.py index d1cb74f..9e9700f 100644 --- a/py/src/main.py +++ b/py/src/main.py @@ -1,2 +1,20 @@ +#!/usr/bin/env pybricks-micropython +from pybricks.hubs import EV3Brick +from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor, + InfraredSensor, UltrasonicSensor, GyroSensor) +from pybricks.parameters import Port, Stop, Direction, Button, Color +from pybricks.tools import wait, StopWatch, DataLog +from pybricks.robotics import DriveBase +from pybricks.media.ev3dev import SoundFile, ImageFile -print("Hello world.") \ No newline at end of file + +# This program requires LEGO EV3 MicroPython v2.0 or higher. +# Click "Open user guide" on the EV3 extension tab for more information. + + +# Create your objects here. +ev3 = EV3Brick() + + +# Write your program here. +ev3.speaker.beep()