Giter Site home page Giter Site logo

micropython-new-ble-library's Introduction

MicroPython New BLE Library

项目介绍

测试方法

特别注意:每做一次不同类型的测试时,必须取消配对后再运行测试程序。

键盘测试

使用ab 工具上传键盘所需文件,然后运行tests/test_keyboard.py文件。

# 上传文件
$ ab abconfig_kbd104

# 进入交互模式
$ ab --repl

# 运行测试脚本
# ctrl + r,输入 test\test_keyboard.py 前边的序号并回车

使用电脑或手机搜索并连接键盘,连接成功后使用开发板上的BOOT按键模拟键盘按键操作即可。

默认设备名称:MP_KB104

可以自行修改tests/test_keyboard.py文件对应内容以修改按键引脚。

UART 测试

使用ab 工具上传UART所需文件,然后运行tests/test_uart.py文件。

# 上传文件
$ ab abconfig_uart

# 进入交互模式
$ ab --repl

# 运行测试脚本
# ctrl + r,输入 test\test_uart.py 前边的序号并回车
  • BLE UART测试方法:参考 ESP32 BLE - UART 说明文档中关于nRF Connect的操作说明

    默认设备名称:ble_uart

  • BLE Config测试方法:参考 MicroPython BLE 配网 说明文档中关于小程序的操作说明

    默认设备名称:ble_config

Time 测试

准备两块开发板,使用ab 工具上传Time所需文件,然后运行tests/test_time.py文件,两块开发板分别运行Server模式和Client模式。

# 上传文件
$ ab abconfig_time

# 进入交互模式
$ ab --repl

# 运行测试脚本
# ctrl + r,输入 test\test_time.py 前边的序号并回车

# 一块开发板选择 Time Server 模式
# 另一块开发板选择 Time Client 模式

先运行 Time Server,再运行 Time Client,观察交互窗口打印的消息。

参考资料

合作交流

走线物联扇贝物联

micropython-new-ble-library's People

Contributors

walkline80 avatar

Stargazers

 avatar liang tongtong avatar audioman avatar

Watchers

 avatar

micropython-new-ble-library's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.