Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed nRF51822
Fork of SmartPlugBLE by
main.cpp
00001 #include "mbed.h" 00002 #include "SmartPlugBLE.h" 00003 #include "BLECommunication.h" 00004 #include "BLE.h" 00005 BLE ble; 00006 00007 void disconnectionCallback(Gap::Handle_t handle, Gap::DisconnectionReason_t reason) 00008 { 00009 printf("reason = x%08x\r\n",reason); 00010 ble.gap().startAdvertising(); 00011 } 00012 00013 int main(void) 00014 { 00015 ble.gap().onDisconnection(disconnectionCallback); 00016 Ticker ticker; 00017 SmartPlugBLE smartPlugBLE; 00018 BLECommunication bleComm(smartPlugBLE,ble); 00019 }
Generated on Fri Jul 22 2022 14:22:22 by
1.7.2
