【文件属性】:
文件名称:pylgbst:乐高:registered:PoweredUp设备的Python库
文件大小:71KB
文件格式:ZIP
更新时间:2021-04-30 22:41:32
python robotics lego lego-boost Python
Python库与Move Hub / PoweredUp Hub交互
Move Hub是*控制器块。
实际上,Move Hub只是一个蓝牙硬件部件,对其进行的所有操作都是通过通过蓝牙低功耗(BLE)无线协议传递的命令进行的。 发出这些命令的方法之一是使用此库编写Python程序。
最好的开始方法是查看文件,然后运行它(假设您已经安装了库)。
如果您组装了Vernie,则可以从目录运行脚本。
示范影片
特征
自动检测并连接到设备
自动检测连接到集线器的
恒定,成角度和定时运动,旋转传感器订购
:多种模式可测量距离,颜色和亮度
倾斜传感器订购:2轴,3轴,碰撞检测模式
RGB LED颜色变化
按钮状态订阅
提供电池电压和电流订阅
永久蓝牙连接服务器,可加快调试速度
用法
请注意,该库需要安装蓝牙后端库之一,请阅读此处的详细信息。
像这样安装库:
pip install -U py
【文件预览】:
pylgbst-master
----examples()
--------sorter()
--------advancedbutton()
--------vernie()
--------__init__.py(0B)
--------plotter()
--------demo.py(8KB)
--------harmonograph()
--------automata()
--------tracker()
--------bb8joystick()
----.travis.yml(1KB)
----LICENSE(1KB)
----setup.cfg(39B)
----setup.py(667B)
----README.md(7KB)
----pylgbst()
--------peripherals.py(23KB)
--------__init__.py(3KB)
--------hub.py(11KB)
--------utilities.py(1KB)
--------messages.py(22KB)
--------comms()
----docs()
--------TiltSensor.md(1KB)
--------Peripherals.md(2KB)
--------LED.md(947B)
--------GenericHub.md(806B)
--------VisionSensor.md(2KB)
--------Motor.md(2KB)
--------VoltageCurrent.md(645B)
--------MoveHub.md(2KB)
----tests()
--------descr.json(27KB)
--------test_comms.py(2KB)
--------test_peripherals.py(9KB)
--------__init__.py(2KB)
--------test_hub.py(6KB)
--------test_cbluepy.py(2KB)
--------test_gatt.py(2KB)
--------test_cbleak.py(2KB)
--------test_pygatt.py(2KB)
----.gitignore(65B)