Please Help! "addDescriptor" Example Error

I cannot get the following to compile from this link...

BLEUnsignedCharCharacteristic batteryLevelChar("2A19", BLERead | BLENotify);

BLEDescriptor batteryLevelDescriptor("2901", "millis");  


It gives me this error: 'batteryLevelChar' does not name a type

Thank you, Gary.

Looking at the whole program may help.

What do you mean exactly? That's the example from the link I gave.

Edit: it's ok I figured it out, thank you.

So what was the problem, and how was it solved?

addDescriptor needed moving further down the page, lol.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.