sandeepmistry / arduino-BLEPeripheral

An Arduino library for creating custom BLE peripherals with Nordic Semiconductor's nRF8001 or nR51822.
MIT License
464 stars 180 forks source link

setvalue using string #173

Closed gesaleh closed 7 years ago

gesaleh commented 7 years ago

Hi i would like to set the value with several values 1,3,5,6,7 i tried converting it to char then setvalue doesn't work

BLEService aqService = BLEService("CCC0");
BLEFloatCharacteristic nh3Characteristic = BLEFloatCharacteristic("CCC1", BLERead | BLENotify);
BLEDescriptor nh3Descriptor = BLEDescriptor("2901", "String");

 blePeripheral.setAdvertisedServiceUuid(aqService.uuid());
  blePeripheral.addAttribute(aqService);
  blePeripheral.addAttribute(SCharacteristic);

 char b[100] ;
 r.toCharArray(b, 100);
 SCharacteristic.setValue(b,100);

no matching function for call to 'BLEFloatCharacteristic::setValue(char [100], int)'

anything i'm doing wrong ?

gesaleh commented 7 years ago

understood my mistake