Skip to content

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

Closed

Description

@johnscary-ev3

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.

Activity

  1. added
    support
    triage
    on Nov 21, 2020
  2. laurensvalk commented on Nov 21, 2020

    @laurensvalk
    Member

    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.

  3. BertLindeman commented on Nov 21, 2020

    @BertLindeman
  4. added
    hub: primehub/inventorhub
    and removed
    triage
    on Nov 21, 2020
  5. laurensvalk commented on Nov 21, 2020

    @laurensvalk
  6. BertLindeman commented on Nov 21, 2020

    @BertLindeman
  7. johnscary-ev3 commented on Nov 22, 2020

    @johnscary-ev3
    Author
  8. johnscary-ev3 commented on Nov 22, 2020

    @johnscary-ev3
    Author
  9. BertLindeman commented on Nov 22, 2020

    @BertLindeman
  10. laurensvalk commented on Nov 22, 2020

    @laurensvalk
  11. Alitai12 commented on Nov 22, 2020

    @Alitai12
  12. laurensvalk commented on Nov 22, 2020

    @laurensvalk
  13. Alitai12 commented on Nov 22, 2020

    @Alitai12
  14. 70 remaining items

  15. laurensvalk commented on Jan 4, 2022

    @laurensvalk
    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.

  16. johnscary-ev3 commented on Jan 4, 2022

    @johnscary-ev3
    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.

  17. laurensvalk commented on Jan 4, 2022

    @laurensvalk
    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.

  18. johnscary-ev3 commented on Jan 5, 2022

    @johnscary-ev3
    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.

  19. laurensvalk commented on Jan 7, 2022

    @laurensvalk
    Member

    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.

  20. SpudGunMan commented on Jan 8, 2022

    @SpudGunMan

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

  21. blac1175 commented on Jan 9, 2022

    @blac1175

    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.

  22. laurensvalk commented on Jan 10, 2022

    @laurensvalk
    Member

    Thanks for your patience everyone! 😄

  23. DanNetor commented on Jan 12, 2022

    @DanNetor

    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
    "

  24. poldolot commented on Jan 12, 2022

    @poldolot

    ...
    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 ;>

  25. DanNetor commented on Jan 12, 2022

    @DanNetor

    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.

  26. laurensvalk commented on Jan 12, 2022

    @laurensvalk
    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 :)

  27. laurensvalk commented on Jan 14, 2022

    @laurensvalk
    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.

  28. locked as resolved and limited conversation to collaborators on Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    hub: primehub/inventorhubsupport

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions