Skip to content

Hanging during initialization #2550

@derrickgw

Description

@derrickgw

I have run into a problem with some beta firmware where the code doesn't respond. I have created a minimal program that exhibits the bug.

This program never reaches the print statement:

from pybricks.hubs import PrimeHub
from pybricks.parameters import Direction, Port
from pybricks.pupdevices import Motor
from pybricks.robotics import DriveBase

# Set up all devices.
# prime_hub = PrimeHub()
# right_wheel = Motor(Port.D, Direction.CLOCKWISE)
# left_wheel = Motor(Port.C, Direction.COUNTERCLOCKWISE)
# drivebase = DriveBase(left_wheel, right_wheel, 56, 125)
# left_arm = Motor(Port.A, Direction.CLOCKWISE)
right_arm = Motor(Port.B, Direction.CLOCKWISE)


# The main program starts here.
print('abc')

I have never run into this on the released firmware. Reflashing with https://github.com/pybricks/pybricks-micropython/actions/runs/20963114260#artifacts did not fix it.

I was able to fix it by unplugging and plugging in the motors. However, power cycling the hub doesn't always fix it.

The hardest part is that when doing block coding, it hangs before the user code, so it is hard to know what is going on.

Originally posted by @derrickgw in #2420 (reply in thread)
Originally posted by @laurensvalk in #2420 (reply in thread)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions