Nicolas Borla / Mbed 2 deprecated Bluetooth_Nukleon

Dependencies:   mbed nRF51822

Files at this revision

API Documentation at this revision

Comitter:
borlanic
Date:
Tue Mar 20 07:58:24 2018 +0000
Child:
1:aecce7b83157
Commit message:
egwe

Changed in this revision

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
nRF51822.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 20 07:58:24 2018 +0000
@@ -0,0 +1,39 @@
+#include <cstdlib>
+#include <mbed.h>
+#include <math.h>
+
+
+Serial pc(USBTX, USBRX); // tx, rx
+Serial device(PA_0, PA_1);  // tx, rx
+DigitalOut myled(LED1);
+
+int main()
+{
+
+    device.baud(9600);
+    //device.printf("ciao\n");
+    pc.printf("cazzo\n");
+    int i = 0;
+
+    myled = 0;
+
+    while(1) {
+        if(pc.readable()) {
+            device.putc(pc.getc());
+            char a = pc.getc();
+
+            if(a == "1") {
+                myled = 0;
+            } else {
+                myled = 1;
+            }
+        }
+        if(device.readable()) {
+            pc.putc(device.getc());
+        }
+        device.printf("cazzo %d\r\n",i);
+        i++;
+        wait(1);
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 20 07:58:24 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/aa5281ff4a02
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nRF51822.lib	Tue Mar 20 07:58:24 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#c90ae1400bf2