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

Investigate why TechnicMediumHub responds with LedLight when VccPortControlOn/Off is sent #4

Open
tthiery opened this issue Jun 15, 2020 · 8 comments

Comments

@tthiery
Copy link
Member

tthiery commented Jun 15, 2020

Current Behavior
hub.VccPortControlOnAsync() or hub.VccPortControlOffAsync seems to trigger a detach on all ports with an attached device and then a registration of a LedLight (which as a device is currently not implemented).

Question

  • Why is that?
  • What is that for?
  • Maybe VccPortControlOnAsync means to switch of the wire communication protocol and instead just supply energy? Useful for more dumb devices? However, maybe this command is used to preserve energy on the hub, but why is then a LedLight showing up.
tthiery referenced this issue in sharpbrick/powered-up Jun 15, 2020
- Also implemented VccPortControlOn/OffAsync exposing bug #24

#25
@tthiery
Copy link
Member Author

tthiery commented Aug 13, 2020

See pybricks/support#71

@tthiery
Copy link
Member Author

tthiery commented Aug 13, 2020

@tthiery
Copy link
Member Author

tthiery commented Aug 13, 2020

Considering @dlech reply in pybricks question, this feature more sounds like disabling the energy supply to all ports (external/internal?).

According to this post, LED lights are not using VCC at all. Maybe that is the reason why the hub defaults to led lights when switching of power.
https://bricks.stackexchange.com/questions/10373/which-resistor-value-is-used-for-which-motor-in-power-functions-2-0

@dlech You seem to be a hardware genius ... thoughts on this?

@dlech
Copy link

dlech commented Aug 13, 2020

This turns power to pin 4 on the I/O ports on and off. I'm not sure what any practical purpose there would be for this though. Maybe it was used during product development to reboot the sensors or something like that?

@tthiery
Copy link
Member Author

tthiery commented Aug 13, 2020

Personal guess: Something like a red button "emergency switch" to immediately halt all devies. But that does not explain the LEDs.

@dlech
Copy link

dlech commented Aug 13, 2020

It is probably just a coincidence that with the power off the electrical circuit looks like the LED lights and so the automatic device detection algorithm detects that instead of no device connected.

@dlech
Copy link

dlech commented Aug 13, 2020

to immediately halt all devices

It would not stop motors since those use direct battery power. 😉

@dlech
Copy link

dlech commented Aug 13, 2020

On second thought, maybe it would since it would think that the motor is detached.

@tthiery tthiery transferred this issue from sharpbrick/powered-up Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants