Some kinda program for some kind of tanky creation of mine with LEGO, the EV3Brick, and Python 🫠
- Python: 3.5.3
- Poetry: 1.1.13 (only compatible with >=3.8.1)
To get your local environment setup, fun the following:
$ poetry config cache-dir ./.poetry-cache
$ poetry install
If you're using VS Code, you should additionally create a local .vscode
folder with a settings.json
file and add the following:
{
"python.analysis.extraPaths": [
// replace `ev3-basically-a-tank-aBCDEFGH-py3.8` with the name of the similarly-located folder from your local poetry cache directory
"./.poetry-cache/virtualenvs/ev3-basically-a-tank-aBCDEFGH-py3.8/lib/python3.8/site-packages"
]
}
$ ssh robot@ev3dev.local
default password is maker
Printing to VS Code terminal:
all_motors = list_devices("dc-motor", "*")
print(("-" * 30) + " all_motors " + ("-" * 30), file=sys.stderr)
for motor in all_motors:
print(motor, file=sys.stderr)
motor_members = getmembers(motor)
for member_tup in motor_members:
name, value = member_tup
print("name: {}".format(name), file=sys.stderr)
print("value: {}".format(value), file=sys.stderr)
- https://stackoverflow.com/questions/57483794/python-shlex-no-closing-quotations-error-how-to-deal-with
- [Question] How can we ev3devBrowser.download.exclude multiple patterns? #104
- answer: use
ev3devBrowser.download.exclude: "GlobPattern"
(see Glob-Patterns) - suggested:
"ev3devBrowser.download.exclude": "{**/.*/*,**/tests/*}",
- answer: use