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

[Bug] TechnicHub with L (88013) Motor #1131

Closed
tomijah opened this issue Jul 1, 2023 · 23 comments
Closed

[Bug] TechnicHub with L (88013) Motor #1131

tomijah opened this issue Jul 1, 2023 · 23 comments
Assignees
Labels
bug Something isn't working software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: motors Issues involving motors

Comments

@tomijah
Copy link

tomijah commented Jul 1, 2023

Seems like L 88013 motors are not being recognized. I tried it on City, Technic, Inventors Hubs.
I tested all ports in Technic Hub with 3 different 88013 motors. I also tried to mix up the ports (like connect to A and indicate B in code). Every time I'm getting

image

My code:

from pybricks.hubs import TechnicHub
from pybricks.pupdevices import Motor
from pybricks.parameters import Button, Color, Direction, Port, Side, Stop
from pybricks.robotics import DriveBase
from pybricks.tools import wait, StopWatch

hub = TechnicHub()
mot = Motor(Port.A)

mot.run(900)
wait(2000)

To reproduce

Firmware v3.3.0b7

  1. Connect 88013 to any port of the TechnicHub
  2. Run the above program

Expected behavior
The motor should run for 2 seconds

@tomijah tomijah added the triage Issues that have not been triaged yet label Jul 1, 2023
@dlech dlech added bug Something isn't working topic: motors Issues involving motors software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) and removed triage Issues that have not been triaged yet labels Jul 1, 2023
@tomijah
Copy link
Author

tomijah commented Jul 1, 2023

This is just one example of the issues I encountered after installing v3.3.0b7. I won't be ticketing all of them right away just in case they could have the same cause (e.g. the latest refactors pybricks/pybricks-micropython#174)

@KWSmit
Copy link

KWSmit commented Jul 1, 2023

I just tested it on one of my Technic Hubs with motors 88018 and 88008, ColorDistanceSensor and Light. Everything seems to work fine when motor or sensor connected to Ports A, C or D. Only port B gives the same result as mentioned by Tomasz for both motors and the ColorDistanceSensor: in REPL the statement m = Motor(Port.B) gives OSError: [Errno 19] ENODEV: etc. With the lights there is no error, but lights won't turn on. When using one of the other ports there is no problem and everything seems to work fine...

@tomijah
Copy link
Author

tomijah commented Jul 1, 2023

For me, 88018 and 88008 doesn't work on port A but work on any other. 88013 consistently doesn't work on any of the ports.
Also similar behavior as for @KWSmit with Light (doesn't crash but lights won't turn on)

@laurensvalk
Copy link
Member

Thanks for reporting! We changed the port interface extensively so it's possible something slipped through.

If anyone has a prime hub or inventor hub to repeat the tests that would be useful.

I'll try reproducing it on all hubs on Monday.

@laurensvalk
Copy link
Member

laurensvalk commented Jul 1, 2023

I can reproduce this. This does not seem to affect the Prime Hub (where most testing was done).

On Technic Hub, UART sensors are giving this error while syncing up:

Data error: Received INFO for incorrect mode

And then the detection process for that port gets confused. So at first glance, this does not seem unique to a particular port (it can happen everywhere), it just appears that way if something was plugged in and then removed.

@KWSmit
Copy link

KWSmit commented Jul 1, 2023

Just tested it briefly on Inventor Hub. Mine is build now as Gelo and all motors and sensors work fine on all ports.

@tomijah
Copy link
Author

tomijah commented Jul 1, 2023

InventorHub:

Motors 88018 and 88008 - work on all ports
Motor 88013 - doesn't work at all
ColorSensor 45605 - work on all ports
Light 88005 - on all ports: no error, no light
45604 UltrasonicSensor - works on all ports (including lights)
45606 ForceSensor - work on all ports
88007 ColorDistanceSensor - work on all ports

@laurensvalk
Copy link
Member

Thank you both for the fast responses! We should be able to fix this in the coming week.

laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Jul 3, 2023
This is constant information used in several places. Keeping it in one
place is easier to maintain and less error prone.

Also fixes Technic Large motor not being detected because it was missing on one of these (duplicated) lists.

See pybricks/support#1131.
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Jul 3, 2023
This is constant information used in several places. Keeping it in one
place is easier to maintain and less error prone.

Also fixes Technic Large motor not being detected because it was missing on one of these (duplicated) lists.

See pybricks/support#1131.
@laurensvalk
Copy link
Member

laurensvalk commented Jul 3, 2023

The Technic motor and Light were not working on any hub in this release, which has now been fixed. These were small independent mistakes made during a large code overhaul we did recently.

The next step is to fix device synchronization on Technic Hub.

@laurensvalk
Copy link
Member

laurensvalk commented Jul 3, 2023

@KWSmit, @tomijah, to try this out, get the firmware from https://nightly.link/pybricks/pybricks-micropython/workflows/build/master and install it like this: https://pybricks.com/install/technic-boost-city/#installing-the-latest-build-advanced

Not everything is fully fixed. You still have to plug in the cables after switching the hub on. This will be addressed in #1134.

@BertLindeman
Copy link

Confusion here, Laurens.

Installing the CI-firmware you point to above shows:
('technichub', '3.3.0b7', 'v1.20.0-23-g6c633a8dd on 2023-07-03')

Basic 3.3.0b7 firmware shows:
('technichub', '3.3.0b7', 'v1.20.0-23-g6c633a8dd on 2023-06-30')

Only the date changed. I would expect "the git id" to show something like ef4ae70

Probably my ignorance . . .

Bert

@laurensvalk
Copy link
Member

What are you seeing on this screen?

image

@tomijah
Copy link
Author

tomijah commented Jul 3, 2023

Just tested on Technic and Prime hubs and 88013 motor and 88005 Light work nicely.

@BertLindeman
Copy link

What are you seeing on this screen?

image

image

Did another try and got this version:
('technichub', '3.3.0b7', 'v1.20.0-23-g6c633a8dd on 2023-07-03')

@laurensvalk
Copy link
Member

These links should fix this open issue as a whole.

If anyone wants to give this a go, we may be able to release a new beta for everyone by the end of the week 😄

We'll also do some more testing ourselves across a range of hubs/sensors/motors.

@BertLindeman
Copy link

Confirmed OK on TechnicHub.

And now with a version that I understand a bit better 😉
('technichub', '3.3.0b7', 'ci-build-2962-v3.3.0b7-8-g5f1c12d1 on 2023-07-04')

@KWSmit
Copy link

KWSmit commented Jul 4, 2023

Confirmed OK on TechnicHub.

Motor (88008 and 88018) doesn't seem to work on CityHub, whatever I try. Light does.

Hope to try Robot Inventor later tonight...

@laurensvalk
Copy link
Member

City Hub should be fixed on https://nightly.link/pybricks/pybricks-micropython/workflows/build/master when it finishes building in 15 minutes or so. Thanks for reporting @KWSmit !

@KWSmit
Copy link

KWSmit commented Jul 4, 2023

@laurensvalk CityHub ok now.

I have a question: I only can run programs by using Pybricks webapp. Running from the commandline with pubricksdev does not work: no error but program does nothing. Can this be because of new beta for firmware on hub?

To test on Robot Inventor, can I use the link to the Prime firmare?

@KWSmit
Copy link

KWSmit commented Jul 4, 2023

Forget my first question about pybricksdev, it works fine now. Probably did something wrong...

@dlech
Copy link
Member

dlech commented Jul 4, 2023

To test on Robot Inventor, can I use the link to the Prime firmare?

Yes, they both use the same firmware.

@KWSmit
Copy link

KWSmit commented Jul 5, 2023

I don't have the time right now for a thourough test, but Robot Inventor seems to work fine now. Tested with Motors (88008 and 88018), Light, UltrasonicSensor and Colorsensor on different ports. Motors/sensors already connected or changing ports works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: motors Issues involving motors
Projects
None yet
Development

No branches or pull requests

5 participants