Skip to content

Commit

Permalink
Merge pull request #7 from IDATT1004-Team13-H2025/create-project
Browse files Browse the repository at this point in the history
Lag ev3 prosjekt
  • Loading branch information
robinsp authored Oct 22, 2025
2 parents 638e657 + 64bde26 commit 5173f10
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified dokumenter/prosjektplan-2025-team-13.docx
Binary file not shown.
3 changes: 3 additions & 0 deletions py/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__pycache__/
*.pyc
.venv/
13 changes: 13 additions & 0 deletions py/src/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
15 changes: 15 additions & 0 deletions py/src/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
7 changes: 7 additions & 0 deletions py/src/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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"
}
20 changes: 19 additions & 1 deletion py/src/main.py
Original file line number Diff line number Diff line change
@@ -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.")

# 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()

0 comments on commit 5173f10

Please sign in to comment.