#include "JsonLightControl.cpp" #include class BluetoothLEDCallback : public BLECharacteristicCallbacks { JsonLightControl *_lightControl; void onWrite(BLECharacteristic *characteristic) { std::string value = characteristic->getValue(); _lightControl->action(value); } public: BluetoothLEDCallback(JsonLightControl *lightControl){ _lightControl = lightControl; } };