Closed AntoniLuongPham closed 1 year ago
It should work. What is the problem? Is there an error message?
We could probably add an example that sets the direction correctly.
David, Laurens,
I've looked further at the error that @AntoniLuongPham encountered the other day, and it actually didn't have to do with the DriveBase. Rather, he was using set
s and got a NameError: name 'set' isn't defined
on the PrimeHub.
I've asked him to change the title of this issue accordingly.
Thank you.
Vinh
Since we are using dual boot on these hubs, space is limited. It's not quite as bad as the restrictions on Move Hub, but we still have to carefully consider which features we enable.
See also https://github.com/pybricks/pybricks-micropython/pull/60, where we decided not to enable set, at least not for now.
Thanks Laurens for the clarification -- I understand the rationale.
We were trying to use set
because we were initially unsure about the order of the returned collection of buttons.pressed()
. After some more testing we confirmed for ourselves that buttons.pressed()
returned a tuple with MINUS preceding PLUS and followed by LEFT preceding RIGHT -- and hence we were able to get the job done with just tuple comparisons.
For now, I think these technical decisions should be documented so that the users of the Pybricks 3.x versions are aware.
Vinh
That's being done in #286 😉
Brilliant!! -- looking forward to the formal release! :)
Dear @dlech and @laurensvalk,
I am trying to use the DriveBase code with the PrimeHub but it doesn't work.
Could you let me know if it works with only EV3 for now?
Thank you very much.
Antoni