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

[Feature] Add "address" and "light" to class "remote" #404

Closed
falk12 opened this issue Jul 27, 2021 · 9 comments
Closed

[Feature] Add "address" and "light" to class "remote" #404

falk12 opened this issue Jul 27, 2021 · 9 comments
Assignees
Labels
enhancement New feature or request hub: handset Issues related to the LEGO Powered Up Handset (remote control) software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime)

Comments

@falk12
Copy link

falk12 commented Jul 27, 2021

Hi all,

the features "address" and "light" are discussed/planned , but yet not implemented in class "remote"

Use of "address"

  • connect desired remote to the hub
  • reconnect same remote to hub as before
  • espacially on exhibitions where you have many active devices

Use of "light"

  • show different modes of the program/remote
  • i.E. switch from Port A/B to B/C with a technic-hub via "center" button
  • i.E. alarm battery level of hub connected to
  • i.E. status of devices etc.

Perhaps discuss a "disconnect" for the remote?

@falk12 falk12 added enhancement New feature or request triage Issues that have not been triaged yet labels Jul 27, 2021
@dlech dlech added software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: remote control Issues related to remotly controlling hubs and removed triage Issues that have not been triaged yet labels Jul 27, 2021
@dlech
Copy link
Member

dlech commented Jul 27, 2021

Perhaps discuss a "disconnect" for the remote?

What is the use case for this?

@falk12
Copy link
Author

falk12 commented Jul 27, 2021

What is the use case for this?

  • drive a train, stop it, disconnect, start another train with same remote
  • having a GBC with many motors running with a certain speed, but connect and disconnect one remote to the different hubs to adjust speed (by pressing hub button and remote center simultaniosly)

Edit:

@laurensvalk
Copy link
Member

Perhaps discuss a "disconnect" for the remote?

👍

Another case was even used in our own video. But since disconnect() was not available I cheated and just turned the whole hub off instead 😄

laurensvalk added a commit to pybricks/pybricks-api that referenced this issue Jul 28, 2021
dlech added a commit to pybricks/pybricks-micropython that referenced this issue Aug 3, 2021
This adds a light attribute for controlling the status light on the
Powered Up Handset.

Issue: pybricks/support#404
dlech added a commit to pybricks/pybricks-micropython that referenced this issue Aug 3, 2021
This adds a light attribute for controlling the status light on the
Powered Up Handset.

Issue: pybricks/support#404
@laurensvalk
Copy link
Member

laurensvalk commented Aug 5, 2021

Setting the light color seems relatively slow. Would it be faster if we didn't use RGB mode, or is two extra bytes negligible given the overhead data?

EDIT: This seems to be primarily the case when used in a loop. So we can just document it and recommend not to change it too fast. Single changes look fast enough.

@laurensvalk
Copy link
Member

As a minor note, remote.light.on(Color.YELLOW) is pretty much green. More so than, say, Technic Hub.

@laurensvalk
Copy link
Member

The remote seems to remember the light used last. Maybe we can add call self.light.on(Color.WHITE) Remote.init() to get a clean state, which is consistent with re-connecting when re-starting the script.

@dlech dlech added hub: handset Issues related to the LEGO Powered Up Handset (remote control) and removed topic: remote control Issues related to remotly controlling hubs labels Aug 12, 2021
@dlech dlech self-assigned this Aug 16, 2021
dlech added a commit to pybricks/pybricks-micropython that referenced this issue Aug 18, 2021
This adds a close method to disconnect the handset.

The name close() is chosen because it is a common pattern in Python
and will allow the object to be used in generic cases that want a
closable object.

Issue: pybricks/support#404
@dlech
Copy link
Member

dlech commented Aug 31, 2021

This is available at https://beta.pybricks.com now.

@dlech dlech closed this as completed Aug 31, 2021
@falk12
Copy link
Author

falk12 commented Aug 31, 2021

Hi dlech

yes indeed, thanks a lot!
But I expected and hoped that you could specify a MAC-Address when connecting to be sure to have the appropriate one ?
No?
So I would have to rename remote to MAC .....

@dlech
Copy link
Member

dlech commented Aug 31, 2021

It is possible to give each remote a unique and meaningful name. We hoped this would be nicer than using the Blueooth address.

And if you can be sure that only one remote is advertising at a time, then you don't need the name at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hub: handset Issues related to the LEGO Powered Up Handset (remote control) software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime)
Projects
None yet
Development

No branches or pull requests

3 participants