Darrien Galid / Mbed 2 deprecated rf_simple

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Deanatius
Date:
Mon Apr 01 06:36:29 2019 +0000
Commit message:
Simple RF Test - 1/4/2019

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Apr 01 06:36:29 2019 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX);
+Serial device(PTE0, PTE1); //Device tx and rx at PTE0 and PTE1
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
+//Use LEDS to indicate RF link activity
+//Use PC terminal to write messages
+
+int main() {
+    device.baud(9600);
+    
+    while(1) {
+      
+        while (device.readable() == 0) {
+            myled1 = 1;
+            pc.write(device.read());  
+            myled1 = 0;
+        }
+        
+        while (pc.readable() == 0) {
+            myled2 = 1;
+            device.write(pc.read());  
+            myled2 = 0;
+        }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Apr 01 06:36:29 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file