小米移动电源3 30000毫安
小米移动电源3是一款30000mAh的充电宝,可以用来给手机、平板电脑等设备充电。
(资料图)
1、小米移动电源3 30000mAh 快充版售价为169元,支持Micro USB和USB-C两种输入接口,输出支持双向18W快充,可同时给3个设备充电。
2、电池组由三片力神1163115 10000mAh聚合物电池组成,电芯与PCB使用镍片点焊连接。电芯上印有相关参数信息:LISHEN力神锂聚合物电芯,容量10000mAh/37Wh,充电限制电压4.2V,3片并联组成30000mAh容量,用5V3A放电容量是20170mAh。
3、小米移动电源3与PD协议兼容,可以给支持PD共有快充协议的设备充电,比如iPhone、iPad、小米手机平板、Switch、C口笔记本等等。
4、30000毫安容量的充电宝无法带上飞机。
如果您想使用代码来控制小米移动电源3的充电,可以参考以下步骤:
1、使用USB线将小米移动电源3连接到电脑或电源上,等待充电宝充满电。
2、使用USB线将小米移动电源3连接到您的设备上,比如手机或平板电脑。
3、使用以下代码进行测试:
import
usb
.
core
import
usb
.
util
# find our device
dev
=
usb
.
core
.
find
;">=
0x2717
,
idProduct
=
0xff48
)
# was it found?
if
dev
is
None
:
raise
ValueError
;">"Device not found"
)
# set the active configuration. With no arguments, the first
# configuration will be the active one
dev
.
set_configuration
;">)
# get an endpoint instance
cfg
=
dev
.
get_active_configuration
;">)
intf
=
cfg
[
;">0
,
)
]
ep
=
usb
.
util
.
find_descriptor
;">,
# match the first IN endpoint
custom_match
=
\
lambda
e
:
\
usb
.
util
.
endpoint_direction
;">.
bEndpointAddress
)
==
\
usb
.
util
.
ENDPOINT_IN
)
assert
ep
is
not
None
# write the data
ep
.
write
;">"test"
)
这段代码使用了Python的usb库,用于与USB设备进行通信。首先,使用方法找到小米移动电源3的设备信息,然后使用方法设置设备的配置。接下来,使用方法获取设备的输入端口,然后使用方法向设备写入数据。如果一切正常,设备应该开始为您的设备充电。
请注意,上述代码仅供参考,具体实现可能会因设备型号、操作系统等因素而有所不同。