Android USB OTG: programmatically turn off power to the port

前端 未结 2 1044
-上瘾入骨i
-上瘾入骨i 2021-02-01 18:01

Suppose I have a USB-powered LED lamp connected through a USB OTG adapter to a Toshiba Excite 10 tablet running Android 4.0.3, which provides the power.

I want to progra

2条回答
  •  粉色の甜心
    2021-02-01 18:24

    As I know from here https://askubuntu.com/questions/342061/power-on-off-usb-ports "All of the previous answers talk about a USB suspend mechanism, i.e. a "logical power-off", they will never physically cut the VBUS +5V from the USB port.".

    Maybe a hardware solution is bad idea, but I can advise you to use MOSFET transistor with programmed Atmega8U4 chip on PCB, that is programmed to cutoff power to led lamp.

提交回复
热议问题