Closed KnokTheBottle closed 1 year ago
The onConnect() method is a protected member of BleKeyboard. If you want to use it you have to either make it public (bad idea) or to edit the source code. A public method is isConnected().
Okay, I will check isConnected() every now and then instead of using a callback. Thank you for the info!
Hi, I am fairly new to C++ and have trouble understanding how to use the onConnect callback. The onConnect function takes BLEServer as a parameter. How do I use that?
I am used to just doing it like this:
void connectCallback(...){ ... }
bleKeyboard.onConnect(connectCallback);
Can someone show me how to set up the onConnect callback function for me to use?
Best regards