GeezerVison is showing github.com — add hellorobot · WangLeGeWang/learn-python3@6141e7d
File treeExpand file treeCollapse file tree Open diff view settings samples/micropython/hellorobot/hellorobot
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +13Lines changed: 13 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 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 | +} |
Collapse file Copy file name to clipboard +14Lines changed: 14 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 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 | +} |
Collapse file Copy file name to clipboard +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 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 | +} |
Collapse file Copy file name to clipboard +14Lines changed: 14 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 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!') |
|