Skip to content

Instantly share code, notes, and snippets.

@don
Last active October 16, 2015 17:09
Show Gist options
  • Save don/e9d6a1aa037c63d531b5 to your computer and use it in GitHub Desktop.
Save don/e9d6a1aa037c63d531b5 to your computer and use it in GitHub Desktop.
Make:Bluetooth copyedits
void unlockCharacteristicWritten(BLECentral& central,
BLECharacteristic& characteristic) {
// central wrote new value to the unlock characteristic
Serial.println(F("Unlock characteristic written"));
openLock(characteristic.value(), characteristic.valueLength());
}
BLEPeripheral blePeripheral = BLEPeripheral(BLE_REQ, BLE_RDY, BLE_RST);
BLEService weatherService = BLEService("BBB0");
BLEFloatCharacteristic temperatureCharacteristic =
BLEFloatCharacteristic("BBB1", BLERead | BLENotify);
BLEDescriptor temperatureDescriptor = BLEDescriptor("2901", "Temp");
BLEFloatCharacteristic humidityCharacteristic =
BLEFloatCharacteristic("BBB2", BLERead | BLENotify);
BLEDescriptor humidityDescriptor = BLEDescriptor("2901", "Humidity");
BLEFloatCharacteristic pressureCharacteristic =
BLEFloatCharacteristic("BBB3", BLERead | BLENotify);
BLEDescriptor pressureDescriptor = BLEDescriptor("2901", "Pressure");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment