Hello Everyone,
I am a little new to ArduinoBLE Library. I have conducted some experiments and successfully collected current and velocity data via bluetooth (from Nano33 ble to Mac). However, I cannot find how to transfer these bytes to original int value. Does anyone know how to convert it back to integer values ?
Below is the abstract about how I sent my values:
BLEIntCharacteristic batteryLevelChar("2101", BLERead | BLENotify);
BLEDevice central = BLE.central();
v_val = analogRead(A2) ; // 0-1024
cur_val = analogRead(A3);
batteryLevelChar.writeValue(cur_val);
batteryLevelChar.writeValue(v_val);
For example
I got <8500000>,<8900000>,<9500000>,<6f00000>, and I know this value is between 0~1024 ( probably around 300~500)
I have checked the ArduinoBLE Library, but I still cannot find how the integer is convert to byte arrays.
Any suggestions will be very helpful
Thank you very much.
0125Escon_blue.ino (5.86 KB)