Background:
I am am using Adafruit Feather nRF52840 Sense and I want to create perypethial BLE device - cycling power sensor in particular. I want to advertise Cycling Power Service with its mandatory characteristics.
I found CPS (Cycling Power Service) Service here: https://www.bluetooth.com/specifications/specs/
I know which characteristics are requied, but I cannot find Docs on how to implement them using Circuitpython. I found this: https://docs.circuitpython.org/projects/ble/en/latest/ but there is not much info.
I foun how it can be done using Arduino C:
Code taken from: https://teaandtechtime.com/arduino-ble- ... r-service/Code: Select all
BLEService CyclePowerService("1818"); BLECharacteristic CyclePowerFeature("2A65", BLERead, 4); BLECharacteristic CyclePowerMeasurement("2A63", BLERead | BLENotify, 8); BLECharacteristic CyclePowerSensorLocation("2A5D", BLERead, 1); BLE.setDeviceName(BLE_DEVICE_NAME); BLE.setLocalName(BLE_LOCAL_NAME); BLE.setAdvertisedService(CyclePowerService); CyclePowerService.addCharacteristic(CyclePowerFeature); CyclePowerService.addCharacteristic(CyclePowerMeasurement); CyclePowerService.addCharacteristic(CyclePowerSensorLocation); BLE.addService(CyclePowerService);
I want to replicate this tutorial using Adafruit feather and Circuitpython