Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Getting Started Documentation for Robot Inventor? #167

Closed
johnscary-ev3 opened this issue Nov 21, 2020 · 88 comments
Closed

[Question] Getting Started Documentation for Robot Inventor? #167

johnscary-ev3 opened this issue Nov 21, 2020 · 88 comments
Labels
hub: primehub/inventorhub Issues related to the LEGO SPIKE Prime hub and LEGO MINDSTORMS Robot Invetor hub support Request for technical support for a problem that is not a bug or feature request

Comments

@johnscary-ev3
Copy link

Question
Is there documentation for how to get started using Pybricks with the Robot Inventor?

Context
Seems like it is being used to do projects by some, however the Docs don't show how to get going.

Screenshots
There is a saying that a picture is worth a 1000 words. Screenshots really help to identify and solve problems.

@johnscary-ev3 johnscary-ev3 added support Request for technical support for a problem that is not a bug or feature request triage Issues that have not been triaged yet labels Nov 21, 2020
@laurensvalk
Copy link
Member

laurensvalk commented Nov 21, 2020

NOTE: This discussion is outdated.

Please see #591 for updated instructions


Thanks for asking John! You're right, we're quite far along with Pybricks for the Inventor Hub and the Prime Hub. The documentation currently says coming soon, because it is still a bit tricky for beginning users. But since you are asking here, this is a good opportunity to show the more curious users how to get started already.

In the mean time, we're working to make it stable and easy for everyone else too.

Overview

The installation consists of three steps:

  1. Running a script on the hub using the official app. This installs the Pybricks firmware alongside the original.
  2. Starting Pybricks by holding the right button when you turn it on.
  3. Running scripts with Pybricks code.
  4. (Optional) Installing a Python package on your computer, so you can run programs.

1: Installing the firmware

  1. Go to https://install.pybricks.com/ and follow the provided instructions.
  2. Wait for the installation to complete. The hub lights indicate installation progress.
  3. Then it reboots and you will see the Bluetooth light blink. Keep waiting, you're almost done. Finally, the hub boots again and you will see the standard firmware as if nothing happened. Success!

2: Starting Pybricks

  1. Turn off the hub and unplug USB
  2. Press and hold the center button to start Pybricks. If the status light is blinking blue, you are running Pybricks.

A regular (short) press will start the stock firmware instead.

NOTE: For the moment, the battery does not automatically charge while running Pybricks. So, make sure to reboot the hub when you are done using it, so it can charge the battery using the standard firmware.

3: Running scripts

  1. Install Google Chrome.
  2. Go to Pybricks Code. This should be fairly self-explanatory. It's the same for all hubs. We will be adding more documentation and guides as we go along.

4 (Optional) Installing the Pybricksdev command line tool to download and run programs locally

  1. Install Git if you don't have it already.
  2. Install Pybricksdev
  3. On success, you can run programs like this:
poetry run pybricksdev run ble "Pybricks Hub" demo/shortdemo.py
  1. If you open the pybricksdev folder in Visual Studio Code, you can easily run the current file with the Run BLE configuration. Make sure the official Python extension is installed.

5 (Optional) Recovery

A regular firmware update using the official app will remove Pybricks. If this does not work, or if something else does not work, you can recover to the official firmware using this page.

@BertLindeman

This comment has been minimized.

@dlech dlech added hub: primehub/inventorhub Issues related to the LEGO SPIKE Prime hub and LEGO MINDSTORMS Robot Invetor hub and removed triage Issues that have not been triaged yet labels Nov 21, 2020
@laurensvalk

This comment has been minimized.

@BertLindeman

This comment has been minimized.

@johnscary-ev3

This comment has been minimized.

@johnscary-ev3

This comment has been minimized.

@BertLindeman

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@Alitai12

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@Alitai12

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@Alitai12

This comment has been minimized.

@johnscary-ev3

This comment has been minimized.

@dlech

This comment has been minimized.

@Alitai12

This comment has been minimized.

@dlech

This comment has been minimized.

@johnscary-ev3

This comment has been minimized.

@dlech

This comment has been minimized.

@johnscary-ev3

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@johnscary-ev3

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@BertLindeman

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@schmehr

This comment has been minimized.

@laurensvalk

This comment has been minimized.

@wes-pro

This comment has been minimized.

@dlech dlech closed this as completed May 1, 2021
@pybricks pybricks locked and limited conversation to collaborators May 1, 2021
@laurensvalk laurensvalk reopened this May 2, 2021
@pybricks pybricks unlocked this conversation May 11, 2021
@hoppy53
Copy link

hoppy53 commented May 30, 2021

Had it installed. My experiences:
1: Although I had the latest Mindstorm software installed on the Hub, it did hang in "preparing Hub". Even after refreshing page.
After a full reset of the hub in Mindstorms it nicely installed the dual boot.
2:In worked straight away under Windows 10 and under MacOS Big Sur
3: In Linux (Mint) the hub did not want to pair initially.
After clearing the old Pybricks Hub name in the Bluetooth device list it did pair immediately.

Many thanks for this happening.
A USB connection so I can edit in Thonny would be nice !

@laurensvalk laurensvalk unpinned this issue Jul 28, 2021
@VegaMansk
Copy link

VegaMansk commented Dec 12, 2021

Error on code.pybricks.com screen . After connection thrue bluetooth. I get the message unexpected error while trying to connect: Connection failed for unknown reason.

I use: Windows 10 Education: Versie: 10.0.19044 Build 19044. Chrome browser Versie 96.04.4664.93 (64 bits). The update of My Inventor (51515) with pybricks (with USB) went ok. Do you have advise for me?

[](url
Connection screen
errorscreen
)

@dlech
Copy link
Member

dlech commented Dec 12, 2021

Please see #270 for troubleshooting tips and open a new issue with logs/packet capture.

@VegaMansk
Copy link

VegaMansk commented Dec 28, 2021

I tried to install pybricks again. I have got the following error message:

your hub runs LEGO Firmware version: b'v1.4.01.0000-594ce3d'
Your LEGO firmware version is not (yet) supported.
If you have a newer version that is not listed, please ask for support in #167

Here the complete text:

Installation progress
Something went wrong. Please try again.
from _pybricks.install_pybricks import install; install()
Starting installation script.
Checking installation files.
Files looking good!
Getting firmware info.
Your hub runs LEGO Firmware version: b'v1.4.01.0000-594ce3d'
Your LEGO firmware version is not (yet) supported.
Please install one of the following versions and try again.

    v1.2.01.0101-edc1be7 from SPIKE App v2.0.0.
    v1.2.01.0103-d08b6fe from MINDSTORMS Robot Inventor App v1.3.4 / 10.1.0.
    v1.3.00.0203-71f6a41 from MINDSTORMS Robot Inventor App v2.0.0 / 10.2.0.
    v1.1.01.0002-3e5a121 from SPIKE Prime App v1.3.5.
    v1.2.01.0000-849e6c3 from MINDSTORMS Robot Inventor App v1.3.4 / 10.1.0.

If you have a newer version that is not listed, please ask for support in https://github.com/pybricks/support/issues/167

@johnscary-ev3
Copy link
Author

Hi guys,
I just got the same error as @VegaMansk shown above.
Will you be working to get the pybricks installer to allow version V1.4,01 ?
Looks like all my RI apps are now 10.3.0 and the one on my iPhone recently forced a hub firmware update to V1.4.01
So it looks like I am stuck now. Any suggestions?
Thanks.

@laurensvalk
Copy link
Member

We've been working on an updated firmware and installer, but it isn't quite ready yet.

Hopefully we can get the next version out in a few weeks. And if not, we can certainly give this older version a maintenance update to allow V1.4.01, if there's demand for it.

@johnscary-ev3
Copy link
Author

Thanks for quick reply on this.
Since at least two of us have fallen into this trap, I suspect others will have same problem.
Also, it is not so obvious about how to go back to earlier hub versions as the error note suggests.
So, an installer update to allow new version V1.4.01 to be used would be appreciated.

Seems like having your software and the Lego hub software track each other is tricky business.
I suppose every time Lego does a hub update, you would need to test that your software still works and then add new version to your installer. Is there a large dependence on the Lego hub software that would require a lot of update verification?
If not, maybe just check the hub for a minimum rev level in the installer?

Thanks for the help.

@laurensvalk
Copy link
Member

That’s right - we verify the version just to make sure everything is working. In this case, v1.4 does not seem to be out yet in my country.

Once the installer is integrated in our main app, most of this complexity will go away, but this is what we have to do for now.

@johnscary-ev3
Copy link
Author

Not sure if Lego hub updates are linked to App updates but the 10.3 App update on my iPhone shows released 2 weeks ago.

I could help to check functionality using your software on new hub version if that would help.
I guess the download would need to work ok first, but I have an application that uses a lot of the features, like motors, lights, all sensors, sounds, remote control, etc. This is based on the RI "Charlie" model.
Take care.

@laurensvalk
Copy link
Member

laurensvalk commented Jan 7, 2022

In the mean time, you can install the official SPIKE firmware, which should still be compatible with our dual-boot installer.

To do so, launch the SPIKE app. When you connect, it will ask you to do the update.

@SpudGunMan
Copy link

spike is now at LEGO Firmware version: b'v1.3.00.0000-e8c274a', so its too new as well

@blac1175
Copy link

blac1175 commented Jan 9, 2022

I also have v1.4.01.0000-594ce3d, as reported by https://install.pybricks.com/, and so the install fails. For me (in the US, on a modern Android phone) this has been the case at least since I started using my 51515 MINDSTORMS Robot Inventor Lego set on 2021 Dec 25. I'm also looking forward to trying Pybricks, so looking forward to any updates!

For the record, I've tried rolling back to firmware-backup-v1.2.01.0103-d08b6f, and then istalling pybricks, which works, but when I try to run programs, I get all kinds of weird errors. I did not bother with this, because I assumed I should just wait until the modern Hub firmware is supported by Pybricks, and then try again.

@laurensvalk
Copy link
Member

Thanks for your patience everyone! 😄

@DanNetor
Copy link

A rollback to the firmware "firmware-backup-v1.2.01.0103-d08b6f". doesn't work for me either. After installing the "old" firmware, I can no longer connect the hub for the dual-boot installation.

The following error:
"Failed to connect. Please wait 60 seconds and try again. Make sure that no other apps are using the hub."

Screenshot 2022-01-12 095419
"

@poldolot
Copy link

poldolot commented Jan 12, 2022

...
The following error: "Failed to connect. Please wait 60 seconds and try again. Make sure that no other apps are using the hub."
...

I've got the same error on Linux, but on MacOS the installations went through. I've also had v1.4.01.0000-594ce3d firmware that gave me error but after rolling back to v1.3.00.0203-71f6a41 everything went fine and now I can code ;>

@DanNetor
Copy link

I solved the problem on Win 11 / Edge by deleting the driver (hub) in the device manager. then the hub has reconnected properly.

rollback is always necessary (at least in Germany) because the firmware of the native applications (Lego Mindstorms, Spike) currently "not yet" work for the dual boot.

@laurensvalk
Copy link
Member

Thanks everyone for sharing your experiences. Good news --- we expect to release the next beta version next week or so.

The installation will be compatible with the latest official firmware, so please stay tuned :)

@laurensvalk
Copy link
Member

The beta release is now out. Thanks for waiting everyone!

Please see #591 for updated instructions

If you have any questions or concerns regarding the update, please feel free to open a new issue or discussion.

We will be closing this discussion about the alpha version so we don't confuse new users.

@pybricks pybricks locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hub: primehub/inventorhub Issues related to the LEGO SPIKE Prime hub and LEGO MINDSTORMS Robot Invetor hub support Request for technical support for a problem that is not a bug or feature request
Projects
None yet
Development

No branches or pull requests