Hi, I'm an engineering student and I must admit I am quite a beginner when it comes to Arduino, particularly when using bluetooth.
I have a piece of code which requires an input value for RPM from the bluetooth Wahoo cadence sensor to run. (https://uk.wahoofitness.com/devices/bike-sensors/wahoo-rpm-cadence-sensor)
I have the Adafruit Bluefruit LE SPI Friend and an Arduino Uno which I am trying to set up code for to get a value out from the sensor. I have managed to connect the sensor to my phone to see the service and characteristic UUIDs.
There are some forums that mention getting data from the sensor but I don't know if they are relevant or how to apply them to arduino:
Any help would be greatly appreciated as I'm currently in limbo.
Can you set up the bluefruit to be a client (i.e. query the BLUE SC device which acts as a server)? There should be tutorials around on how to do this. If you can do this then you just need to capture the cscmeasurement characteristic data which is in the form of 11 bytes - you want the last two (sorry if you already know this).
byte - single byte value tells you whether wheel (1), crank (2), or both (3) data are present in the message. You are interested in cadence so you would hope this value is either 2 or 3
byte through byte - this is a 4 byte value that tells you the total number of wheel revolutions (not crank)
byte  and byte - this is a 2 byte value that tells you the number of 1/1024 of a second since the last wheel revolution event. This period can then be used to calculate the RPM of the wheel.
byte  and byte - this is a 2 byte value that tells you the total number of crank revolutions
byte and byte - this is a 2 byte value that tells you the number of 1/1024 of a second since the last crank revolution event. This period can then be used to calculate the RPM of the crank. This is the value you want but need to convert this value to an RPM measurement.