Brandon Donohue / Mbed 2 deprecated IoTBattleship

Dependencies:   mbed

Revision:
0:912c221cc186
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothFunc.h	Sat Apr 28 22:07:24 2018 +0000
@@ -0,0 +1,18 @@
+bool bluetoothFunc(int& num, int& upOrDown){
+    char bnum = blue.getc(); 
+    bool dataValid = false;
+    if (bnum =='!') {
+        bnum = blue.getc(); 
+        if (bnum == 'B') {
+            bnum = blue.getc(); 
+            num = bnum - '0'; 
+            upOrDown = blue.getc() - '0';
+            dataValid = true;
+        } 
+    } 
+    if(dataValid){
+        return true;   
+    } else {
+        return false;   
+    }
+}
\ No newline at end of file