pybricks / support

Pybricks support and general discussion
MIT License
109 stars 7 forks source link

Full-Featured API to remotly control PyBricks firmware ? #614

Closed JeanRev closed 2 years ago

JeanRev commented 2 years ago

Hi there,

Last week I played with my son's Move Hub, with the idea of controlling it with an Xbox bluetooth controller.

After a few hours of effort, the result is quite satisfying I must say. Input lag is minimal, and the joystick allows really fine speed adjustment: https://user-images.githubusercontent.com/8666989/150674999-1cc7f926-968e-45aa-96c1-c919b1ca11cd.mp4

Currently the code runs on a Raspberry 3B and uses the node-powered up library to communicate with the hub. Node-poweredup allows to remotely control the official lego firmware by offering a very simple and intuitive API.

To make it short: I would have loved to be able to do the same thing with PyBricks. The idea of having a programmable firmware is really awesome, but I would also like to have a simple way to remotely control my creations. The best of both worlds so to speak :-) If I understood correctly, there is currently no such API for PyBricks. Sending command to the hub must be done with the somewhat low-level function getchar, which requires to implements some kind of communication protocol between the client and the hub.

Would it be worthwhile to enter a feature request for such client API? Is that too ambitious ? Or would it not really fit with Pybricks' philosophy?

(I have very little experience with PyBricks and PoweredUp in general, I apologize in advance if I have misunderstood or missed something).

Thx! Jean

JeanRev commented 2 years ago

Sorry i intended to create a discussion, not opening a issue directly. Moved to https://github.com/pybricks/support/discussions/615