NXP / Mbed 2 deprecated frdm_grove_BLE

Dependencies:   BluetoothSerial mbed

Files at this revision

API Documentation at this revision

Comitter:
GregC
Date:
Tue Apr 26 22:46:08 2016 +0000
Commit message:
Freedom demo featuring Seeed Grove BLE module

Changed in this revision

BluetoothSerial.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BluetoothSerial.lib	Tue Apr 26 22:46:08 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/yihui/code/BluetoothSerial/#f56002898ee8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 26 22:46:08 2016 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "BluetoothSerial.h"
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+BluetoothSerial bluetooth(D1, D0);
+
+int main()
+{ 
+    int count = 0;
+
+    bluetooth.setup();
+#if 1
+    bluetooth.slave("btslave8seeed");  // default PIN code: 0000
+    wait(2);
+    bluetooth.connect();
+#else
+    bluetooth.master("btmaster8seeed");
+    wait(2);
+    bluetooth.connect("btslave8seeed");
+#endif
+   
+    while (1) {
+        if (bluetooth.readable()) {
+            led2 = !led2;
+        }
+        
+        count++;
+        if (count >= 1000000) {
+            led1 = !led1;
+            count = 0;
+        }
+    }
+    
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Apr 26 22:46:08 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file