Console for Lego Mindstorms Inventor / Spike Prime.
Project description
lego-console
Overview
Console for Lego Mindstorm Inventor / Spike Prime.
Refactored from recursivetree/spiketools.
Installation
From pypi.org
$ pip install lego-console
From source code
$ git clone https://github.com/crashvb/lego-console
$ cd lego-console
$ virtualenv env
$ source env/bin/activate
$ python -m pip install --editable .[dev]
Usage
Copying a python script to slot #3
10:57:08 user@local-computer [~/lego-console]
$ lego-console start
Device connected.
10:57:14 MyLegoHub [/]
🤖: install -s 3 -t python my_project.py
Installed '/home/user/lego-console/my_project.py' to slot #3.
10:59:19 MyLegoHub [/]
🤖: slots
Status : Connected
Device : /dev/ttyACM0
Device Name : MyLegoHub
Slots :
0: <empty>
1: <empty>
2: <empty>
3: my_project.py
id : 10003
type : python
modified : 2025-03-01 10:58:24
4: <empty>
5: <empty>
6: <empty>
7: <empty>
8: <empty>
9: <empty>
10:59:22 MyLegoHub [/]
🤖: help
Documented commands (type help <topic>):
========================================
EOF clear disconnect history ls slots upload
cat connect download install quit status vi
cd cp exit ll rm uninstall vim
Undocumented commands:
======================
help
10:59:53 MyLegoHub [/]
🤖: exit
Device disconnected.
10:57:08 user@local-computer [~/lego-console]
$
Environment Variables
| Variable | Default Value | Description |
|---|---|---|
| EDITOR | vim | The default system editor. |
| LC_HISTFILE | ~/.lc_history | The name of the file in which command history is saved. |
| LC_HISTSIZE | 500 | The number of commands to remember in the command history. |
Troubleshooting
Unable to connect; no device provided!
Make sure the hub is powered on and connected via USB or bluetooth.
Message: 'Unable to connect to device: /dev/...'
Make sure the user has permissions to the device.
/dev/ttyACM0for USB connections./dev/rfcomm0for bluetooth connections.
Development
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lego_console-0.1.0.tar.gz
(20.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lego_console-0.1.0.tar.gz.
File metadata
- Download URL: lego_console-0.1.0.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
054db27f7836ef7ce22750c3a07aa80794ca0a1f2851a001b4668eab4408d7f5
|
|
| MD5 |
47b0d1fdb89ecef41189986109d84bab
|
|
| BLAKE2b-256 |
291995639820269d4a03a83b6218310f6767872c70c474d1fc91db170a2d1644
|
File details
Details for the file lego_console-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lego_console-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6799c7fffa70d7fc184a4d2adefcdc962dd183083b6bfdef7a2e18e5709c1024
|
|
| MD5 |
3a94109f7f50740e0712f6da2b5ca852
|
|
| BLAKE2b-256 |
342ba8e43622feb6c58e70809edee3e89e45ee8dfbcea870edb2717285f71ff7
|