【文件属性】:
文件名称:贝岭的matlab的代码-TwitterLight:使用带有TwitterAPI的BellQBelleds灯光来更改灯光的颜色
文件大小:663KB
文件格式:ZIP
更新时间:2021-06-16 09:01:06
系统开源
贝岭的matlab的代码Python
Belleds
API
Python
API
通过基于文档
示例用法:
#!/usr/bin/env
python3
from
belleds
import
Belleds
from
time
import
sleep
b
=
Belleds
()
b
.
connect
(
'192.168.1.139'
)
lights
=
b
.
get_lights
()
for
light
in
lights
:
#
bright
red
light
.
color
=
(
255
,
0
,
0
)
sleep
(
1
)
#
dark
green
light
.
color
=
(
0
,
127
,
0
)
sleep
(
1
)
#
use
hex
strings
if
you
feel
like
light
.
color
=
'#0080CC'
sleep
(
1
)
#
use
brightness
to
switch
the
light
to
white
mode
light
.
brightness
=
127
sleep
(
1
)