Skip to content

M5Stack BLE Central device. Receive notify CSC and HID.

License

Notifications You must be signed in to change notification settings

fknaopen/M5StackBleCentral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M5StackBleCentral

English | 日本語

Work on M5Stack. Using the NimBLE library, a BLE central device that can connect CSC peripherals (cadence sensor, etc.) and HID peripherals (remote shutter, etc.).

Image 1

Requirement

Required library.

  • M5Stack (version=0.3.1 author=M5Stack)
  • FunctionFsm (version=1.0.0 author=JRVeale)
  • M5Stack_OnScreenKeyboard (version=0.3.4 author=lovyan03)
  • M5Stack_TreeView (version=0.2.14 author=lovyan03)
  • NimBLE-Arduino (version=1.2.0 author=h2zero)

Board manager

Specify the URL for M5Stack as the URL of the additional board manager, and use M5Stack-Core-ESP32 for the board.

URL = https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json

Image 1

Design

State Machine used to manage complex operating states.

Image 1

Usage

When started, it scans the advertised peripheral and displays the device list screen for the user to select.

Image 1

Select the CSC device and the HID device in order.

Image 1

Once the selection is complete, the device will be registered internally and will automatically connect to the peripheral from the next boot.

Image 1

If you want to select the peripheral again, press the button at startup to initialize the internal registration.

Implementation

The current source code updates the indicators on the screen when it receives a Notify from the peripheral. It is good to add necessary functions such as output to GPIO to this location (around updateIndicator () processing in keepconnect state).

License

MIT License

Copyright

Naohisa Fukuoka, 2021

About

M5Stack BLE Central device. Receive notify CSC and HID.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages