Skip to content

Commit 6141e7d

Browse files
committed
add hellorobot
1 parent c28549d commit 6141e7d

4 files changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
5+
// List of extensions which should be recommended for users of this workspace.
6+
"recommendations": [
7+
"lego-education.ev3-micropython"
8+
],
9+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
10+
"unwantedRecommendations": [
11+
"ms-python.python"
12+
]
13+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Download and Run",
9+
"type": "ev3devBrowser",
10+
"request": "launch",
11+
"program": "/home/robot/${workspaceRootFolderName}/main.py"
12+
}
13+
]
14+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.eol": "\n",
4+
"debug.openDebug": "neverOpen",
5+
"python.linting.enabled": false
6+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env pybricks-micropython
2+
3+
from pybricks import ev3brick as brick
4+
from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor, InfraredSensor, UltrasonicSensor, GyroSensor)
5+
from pybricks.parameters import (Port, Stop, Direction, Button, Color, SoundFile, ImageFile, Align)
6+
from pybricks.tools import print, wait, StopWatch
7+
from pybricks.robotics import DriveBase
8+
9+
# Write your program here
10+
brick.sound.beep()
11+
# 输出到控制台:
12+
print('Hello, robot!')
13+
# 输出到EV3屏幕:
14+
brick.display.text('Hello, robot!')

0 commit comments

Comments
 (0)