用于Embrava Blynclight设备的Python语言绑定。
blynclight的Python项目详细描述
blynclight是一个python 3包,它为 Embravablynclight产品系列。这些绑定 使用Embrava V30 USB连接指示灯在MacOS和Linux上进行测试。
安装
- 为您的平台安装hidapi:
(rpm Linux distros)# yum install XXXX (apt Linux distros)# apt-get install XXXX (macOS using brew) $ brew install hidapi
- 点
$ pip3 install blynclight
- 克隆存储库
$ git clone https://github.com/JnyJny/blynclight.git $ cd blynclight; pip3 install -e .
开发
$ pip install poetry
$ git clone https://github.com/JnyJny/blynclight.git
$ cd blynclight
$ poetry shell
$ ..
卸载
$ pip3 uninstall blynclight
用法
一旦安装,blynclight是你的命令!
fromblynclightimportBlyncLightlight=BlyncLight.get_light()red,blue,green=(255,0,0),(0,255,0),(0,0,255)light.color=green# the light is off and greenlight.on=True# the light is on and greenlight.flash=True# the light is on, flashing and greenlight.color=red# the light is on, flashing and redlight.flash=False# the light is on and redlight.bright=False# the light is on, dim and redlight.color=blue# the light is on, dim and bluelight.bright=True# the light is on and bluelight.on=False# the light is off and blue
安装blynclight时提供了几个命令行接口:
- blync
- 提供对所有灯光属性的命令行访问。
- fli
- 闪烁灯光。令人印象深刻。
- 彩虹
- 平滑地变换彩虹图案中光的颜色。
- 悸动
- 危险地降低颜色强度,然后后退。一遍又一遍。