1 Star 0 Fork 2

py2012/phyphox示例

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
randomNumbers.py 494 Bytes
一键复制 编辑 原始数据 按行查看 历史
py2012 提交于 2年前 . examples
from phyphoxBLE import PhyphoxBLE, Experiment
import time
import random
def main():
p = PhyphoxBLE()
p.start() #Start the BLE server
while True:
randomNumber = random.randint(0,100) #Generate random number in the range 0 to 100
p.write(randomNumber) #Send value to phyphox
time.sleep_ms(500) #Shortly pause before repeating
if __name__ == "__main__":
main()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/py2012/phyphox.git
git@gitee.com:py2012/phyphox.git
py2012
phyphox
phyphox示例
master

搜索帮助