diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..c141d40 Binary files /dev/null and b/.DS_Store differ diff --git a/oving_2/.gitignore b/oving_2/.gitignore new file mode 100644 index 0000000..00f2d38 --- /dev/null +++ b/oving_2/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +*.pyc +.venv/ diff --git a/oving_2/.vscode/extensions.json b/oving_2/.vscode/extensions.json new file mode 100644 index 0000000..f8f1a44 --- /dev/null +++ b/oving_2/.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/oving_2/.vscode/launch.json b/oving_2/.vscode/launch.json new file mode 100644 index 0000000..d933aeb --- /dev/null +++ b/oving_2/.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/oving_2/.vscode/settings.json b/oving_2/.vscode/settings.json new file mode 100644 index 0000000..b0968c1 --- /dev/null +++ b/oving_2/.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/oving_2/main.py b/oving_2/main.py new file mode 100644 index 0000000..9e9700f --- /dev/null +++ b/oving_2/main.py @@ -0,0 +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 + + +# 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()