adafruit_ble_cycling_speed_and_cadence
¶
BLE Cycling Speed and Cadence Service
Author(s): Dan Halbert for Adafruit Industries
The Cycling Speed and Cadence Service is specified here: https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Services/org.bluetooth.service.cycling_speed_and_cadence.xml
Implementation Notes¶
Hardware:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Adafruit’s BLE library: https://github.com/adafruit/Adafruit_CircuitPython_BLE
- class adafruit_ble_cycling_speed_and_cadence.CSCMeasurementValues(cumulative_wheel_revolutions, last_wheel_event_time, cumulative_crank_revolutions, last_crank_event_time)¶
Namedtuple for measurement values.
For example:
wheel_revs = svc.csc_measurement_values.cumulative_wheel_revolutions
- cumulative_crank_revolutions¶
Alias for field number 2
- cumulative_wheel_revolutions¶
Alias for field number 0
- last_crank_event_time¶
Alias for field number 3
- last_wheel_event_time¶
Alias for field number 1
- class adafruit_ble_cycling_speed_and_cadence.CyclingSpeedAndCadenceService(service: CyclingSpeedAndCadenceService | None = None)¶
Service for reading from a Cycling Speed and Cadence sensor.
- property location: str¶
The location of the sensor on the cycle, as a string.
Possible values are: “Other”, “Top of shoe”, “In shoe”, “Hip”, “Front Wheel”, “Left Crank”, “Right Crank”, “Left Pedal”, “Right Pedal”, “Front Hub”, “Rear Dropout”, “Chainstay”, “Rear Wheel”, “Rear Hub”, “Chest”, “Spider”, “Chain Ring”) “Other”, “Chest”, “Wrist”, “Finger”, “Hand”, “Ear Lobe”, “Foot”, and “InvalidLocation” (if value returned does not match the specification).
- property measurement_values: CSCMeasurementValues | None¶
All the measurement values, returned as a CSCMeasurementValues namedtuple.
Return
None
if no packet has been read yet.