控制柜板LED的模块
cubieleds的Python项目详细描述
#cubieboard led python模块
使用python控制cubieboard上的绿色和蓝色led。
使用python 2.7+和3+
我已经在ARCLinux上进行了测试,但是在
Cubieboard上运行的任何东西都应该工作。
BR/>然后你需要像这里所描述的那样激活LED(http://Linux SunX.org/CuBeBooe/StutsLeDS)。这就是它的工作原理:
``python
>gt>gt>gt;import cubie.led
>打开蓝色led
>gt>gt;cubie.led.led.on(“蓝色”)
>true
>检查蓝色led
>gt;cubie.led.led.status(“蓝色”)
>1
>关闭蓝色led
>关闭蓝色led
>gt
>>gt>gt>gt;cubie.led.led.off(“蓝色”)
>1
>关闭蓝色led
>gt
>gt
>gt>gt>gt>gt>gt;关闭蓝色led br/>正确
再次检查状态
>;>;cubie.led.status(“blue”)
0
使用python控制cubieboard上的绿色和蓝色led。
使用python 2.7+和3+
我已经在ARCLinux上进行了测试,但是在
Cubieboard上运行的任何东西都应该工作。
BR/>然后你需要像这里所描述的那样激活LED(http://Linux SunX.org/CuBeBooe/StutsLeDS)。这就是它的工作原理:
``python
>gt>gt>gt;import cubie.led
>打开蓝色led
>gt>gt;cubie.led.led.on(“蓝色”)
>true
>检查蓝色led
>gt;cubie.led.led.status(“蓝色”)
>1
>关闭蓝色led
>关闭蓝色led
>gt
>>gt>gt>gt;cubie.led.led.off(“蓝色”)
>1
>关闭蓝色led
>gt
>gt
>gt>gt>gt>gt>gt;关闭蓝色led br/>正确
再次检查状态
>;>;cubie.led.status(“blue”)
0