Sorry, I want to ask that if I can send Decimal(like accel x,gyro x) by the ble characteristic to the nrfConnect, when I send the information, it always becomes hexadecimal
Sorry, I want to ask that if I can send Decimal(like accel x,gyro x) by the ble characteristic to the nrfConnect, when I send the information, it always becomes hexadecimal
As awneil states if you send text then nRF Connect will display that text. The way to do it is to use sprintf to copy the string with the value you want to display in decimal, i.e.
uint8_t data[20]; sprintf((char *)data, "Accel X: %f", acc_x);
Then pass the pointer to the data to the SD API for writting/notifying the value.
Best regards
Bjørn
Note that "special measures" are needed to use %f ...
https://devzone.nordicsemi.com/f/nordic-q-a/50243/pca10056-and-float/200512#200512
Another reason to let the app do it!
Note that "special measures" are needed to use %f ...
https://devzone.nordicsemi.com/f/nordic-q-a/50243/pca10056-and-float/200512#200512
Another reason to let the app do it!