PeterStaev / lego-spikeprime-mindstorms-vscode

Helps you connect and work with Lego's SPIKE Prime/MINDSTORMS Robot Inventor hubs
Apache License 2.0
64 stars 22 forks source link

How to download to the brick? #46

Closed dphaine closed 2 years ago

dphaine commented 2 years ago

Hi there!

The instructions read, "Once connected you can start a running program by choosing its slot."

However it doesn’t say where or how to choose its slot. Can you please elaborate?

Thanks in advance! Philip

PeterStaev commented 2 years ago

Hey @dphaine , there are two ways to select a slot:

  1. When you use the "LEGO Hub: Run program" you will be asked for a slot and also the type of the program you are uploading. This is show on the screenshots just below the text you quoted above.
  2. The other way is by specifying a predefined file header comment as explained here: https://github.com/PeterStaev/lego-spikeprime-mindstorms-vscode#automatic-uploadstart-of-a-python-file
dphaine commented 2 years ago

Thank you for your quick response Peter!

The (obvious) bit that we missed was Cmd-Shift-P and then start typing the command. It might be nice to include this for the noobs.

Big thanks for creating this tool. The Lego editor is painfully buggy so we look forward to using vscode.

Philip

On Aug 6, 2022, at 7:55 AM, Peter Staev @.***> wrote: Hey @dphaine , there are two ways to select a slot:

When you use the "LEGO Hub: Run program" you will be asked for a slot and also the type of the program you are uploading. This is show on the screenshots just below the text you quoted above. The other way is by specifying a predefined file header comment as explained here: https://github.com/PeterStaev/lego-spikeprime-mindstorms-vscode#automatic-uploadstart-of-a-python-file — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

PeterStaev commented 2 years ago

Yes, the Ctrl+Shift+P is one way to run the program. But also you can use the buttons at the top right of the editor: image Just keep in mind that the first one ("Run Python File") is the default python one that executes locally, which can't work as locally you do not have the hub sepcific libs. Just look for the "Lego Hub:" prefixed ones, those are the ones coming from this extension :)