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:

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=None)

Service for reading from a Cycling Speed and Cadence sensor.

location

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).

measurement_values

All the measurement values, returned as a CSCMeasurementValues namedtuple.

Return None if no packet has been read yet.