UI Suggestions & Mac Bug? #1988
Replies: 4 comments 3 replies
-
Thanks for the suggestions!
Other Mac users have reported similar issues. Not really sure there is anything we can do about this one other than work around it by disconnecting other Bluetooth devices like you have already figured out. |
Beta Was this translation helpful? Give feedback.
-
😄
I think you could achieve something like that with the import statement:
from pybricks.parameters import Direction, Port
from pybricks.pupdevices import Motor
from pybricks.robotics import DriveBase
# Set up all devices.
left = Motor(Port.A, Direction.COUNTERCLOCKWISE)
right = Motor(Port.B, Direction.CLOCKWISE)
robot = DriveBase(left, right, 56, 128)
gripper = Motor(Port.C, gears=[12, 36]) Then in any other file you can do: from team2_header import robot, gripper
# Then you can do:
robot.straight(500) |
Beta Was this translation helpful? Give feedback.
-
a couple of more questions
thanks |
Beta Was this translation helpful? Give feedback.
-
The maximum is the default. Reducing the torque can be helpful in some fragile designs where you want the motor to stall rather than push through. For running to target angles, use run_target. The motor is not well suited for speeds below 150 degrees per second (15% of rated speed) due to the relatively high mechanical friction. |
Beta Was this translation helpful? Give feedback.
-
i'm a coach for an FLL team and we just switched from Lego Spike this weekend. We got fed up with the poor documentation, inconsistent behavior, and incoherent API from Lego. Lego really should just abandon Spike and fund y'all. ;)
the ability to run the "web app" without an internet connection made the switch possible. great idea!!!
the kids managed to get all our code moved over in a day and they are much happier!
some suggestions:
basically something
include "team2_header.py"
for the Mac Bluetooth Bug?
On a Macbook Pro (M2 based) & Macbook Air (M3), if i have a Bluetooth mouse connected when trying to connect to a Spike Prime hub I get the following:
An unexpected error occurred. Please consider reporting this so we can make a better error message.
Failed to execute 'getPrimaryService' on 'BluetoothRemoteGATTServer': GATT Server is disconnected. Cannot retrieve services. (Re)connect first with
device.gatt.connect
.if turn off the mouse, connect the hub, and reconnect the mouse it works. just kinda odd.
btw, we have a similiar problem with Lego Spike application as well.
Beta Was this translation helpful? Give feedback.
All reactions