I can't seem to pass an integer value over BLE.
I'm using the #include <ArduinoBLE.h> Arduino library.
The value sent keeps getting converted down to 8bit?
I've tried a number of things like changing the BLE Characteristic to Int (BLEIntCharacteristic) and Char (BLECharCharacteristic) but this has no effect.
Thanks in advance.
void loop() {
int reading;
{
BLEDevice central = BLE.central();
if (central)
{
digitalWrite(LED_BUILTIN, HIGH);
while (central.connected()) {
reading = adc.readFB(0, 2.5, 500000.00);
serviceCharacteristic.setValue(reading); //reading value from load sensor is eg ; 89943
Serial.print(reading);
Serial.print('\n');
//delay(200);
}
}
digitalWrite(LED_BUILTIN, LOW);
}