以太网上的r2d7阴影控制器
r2d7p的Python项目详细描述
R2D7遮阳控制器组件
通过以太网适配器控制r2d7阴影的软件包 使用python。
示例:
from time import sleep
from r2d7py import *
hub = R2D7Hub( 'host.test.com', 4008 )
# Address=1, Unit=2, shade traversal time=14.2
shade = hub.shade( 1, 2, 14.2 )
# Open the shade
shade.open()
sleep(15.)
# Position the shade half way
shade.position = 50.
sleep(15.)
# Close the interface
hub.close()