From 62704ad287915907fc95835c04abb6f1342e66a9 Mon Sep 17 00:00:00 2001 From: Todd Treece Date: Thu, 9 Mar 2017 09:59:26 -0500 Subject: [PATCH] remove central example folder --- .../central_bleuart/central_bleuart.ino | 73 ------------------- .../central/central_scan/central_scan.ino | 64 ---------------- 2 files changed, 137 deletions(-) delete mode 100644 libraries/Bluefruit52Lib/examples/central/central_bleuart/central_bleuart.ino delete mode 100644 libraries/Bluefruit52Lib/examples/central/central_scan/central_scan.ino diff --git a/libraries/Bluefruit52Lib/examples/central/central_bleuart/central_bleuart.ino b/libraries/Bluefruit52Lib/examples/central/central_bleuart/central_bleuart.ino deleted file mode 100644 index 655af04f..00000000 --- a/libraries/Bluefruit52Lib/examples/central/central_bleuart/central_bleuart.ino +++ /dev/null @@ -1,73 +0,0 @@ -/********************************************************************* - This is an example for our nRF52 based Bluefruit LE modules - - Pick one up today in the adafruit shop! - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - MIT license, check LICENSE for more information - All text above, and the splash screen below must be included in - any redistribution -*********************************************************************/ - -#include - -void setup() -{ - Serial.begin(115200); - - Serial.println("Bluefruit52 Central Scan Example"); - - // up to 1 peripheral conn and 1 central conn - Bluefruit.begin(true, true); - Bluefruit.setName("Bluefruit52"); - - // Increase BLink rate to different from PrPh advertising mode - Bluefruit.setConnLedInterval(250); - - // Callbacks for Central - Bluefruit.Central.setConnectCallback(connect_callback); - Bluefruit.Central.setDisconnectCallback(disconnect_callback); - - // Start Central Scan - Bluefruit.Central.setScanCallback(scan_callback); - Bluefruit.Central.startScanning(); -} - -void scan_callback(ble_gap_evt_adv_report_t* report) -{ - // Check if advertising contain BleUart service - if ( Bluefruit.Central.checkUuidInScan(report, BLEUART_UUID_SERVICE) ) - { - Serial.println("BLE UART service detected"); - Serial.println("Attempt to connect ... "); - - // Connect to device with bleuart service in advertising - // Use Min & Max Connection Interval default value - Bluefruit.Central.connect(report); - } -} - -void connect_callback(void) -{ - Serial.println("Connected"); -} - -void disconnect_callback(uint8_t reason) -{ - (void) reason; - - Serial.println("Disconnected"); - Serial.println("Bluefruit will auto start scanning (default)"); -} - -void loop() -{ - // Toggle both LEDs every 1 second - digitalToggle(LED_BUILTIN); - - delay(1000); -} - diff --git a/libraries/Bluefruit52Lib/examples/central/central_scan/central_scan.ino b/libraries/Bluefruit52Lib/examples/central/central_scan/central_scan.ino deleted file mode 100644 index 53b0e8b3..00000000 --- a/libraries/Bluefruit52Lib/examples/central/central_scan/central_scan.ino +++ /dev/null @@ -1,64 +0,0 @@ -/********************************************************************* - This is an example for our nRF52 based Bluefruit LE modules - - Pick one up today in the adafruit shop! - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - MIT license, check LICENSE for more information - All text above, and the splash screen below must be included in - any redistribution -*********************************************************************/ - -#include - -void setup() -{ - Serial.begin(115200); - - Serial.println("Bluefruit52 Central Scan Example"); - - // up to 1 peripheral conn and 1 central conn - Bluefruit.begin(true, true); - Bluefruit.setName("Bluefruit52"); - - // Start Central Scan - Bluefruit.setConnLedInterval(250); - Bluefruit.Central.setScanCallback(scan_callback); - Bluefruit.Central.startScanning(); -} - -void scan_callback(ble_gap_evt_adv_report_t* report) -{ - Serial.println("Timestamp Addr Rssi Data"); - - Serial.printf("%09d ", millis()); - - Serial.printBuffer(report->peer_addr.addr, 6, ':'); - Serial.print(" "); - - Serial.print(report->rssi); - Serial.print(" "); - - Serial.printBuffer(report->data, report->dlen, '-'); - Serial.println(); - - // Check if advertising contain BleUart service - if ( Bluefruit.Central.checkUuidInScan(report, BLEUART_UUID_SERVICE) ) - { - Serial.println(" BLE UART service detected"); - } - - Serial.println(); -} - -void loop() -{ - // Toggle both LEDs every 1 second - digitalToggle(LED_BUILTIN); - - delay(1000); -} -