n/a

Dependencies:   SoftwareSerial mbed

Fork of XBeeTest by Vlad Cazan

Files at this revision

API Documentation at this revision

Comitter:
yokotay
Date:
Fri Nov 13 11:11:39 2015 +0000
Parent:
0:25aca1983704
Child:
2:3b1482a11290
Commit message:
init

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
--- a/main.cpp	Tue Sep 29 21:31:14 2009 +0000
+++ b/main.cpp	Fri Nov 13 11:11:39 2015 +0000
@@ -9,28 +9,30 @@
 
 #include "mbed.h"
 
-Serial xbee1(p9, p10); //Creates a variable for serial comunication through pin 9 and 10
+Serial xbee1(D1, D0); //Creates a variable for serial comunication through pin 9 and 10
 
-DigitalOut rst1(p11); //Digital reset for the XBee, 200ns for reset
+//DigitalOut rst1(p11); //Digital reset for the XBee, 200ns for reset
 
-DigitalOut myled(LED3);//Create variable for Led 3 on the mbed
-DigitalOut myled2(LED4);//Create variable for Led 4 on the mbed
+DigitalOut myled(LED1);//Create variable for Led 3 on the mbed
+//DigitalOut myled2(LED4);//Create variable for Led 4 on the mbed
 
 Serial pc(USBTX, USBRX);//Opens up serial communication through the USB port via the computer
 
 int main() {
-    rst1 = 0; //Set reset pin to 0
+//    rst1 = 0; //Set reset pin to 0
     myled = 0;//Set LED3 to 0
-    myled2= 0;//Set LED4 to 0
-    wait_ms(1);//Wait at least one millisecond
-    rst1 = 1;//Set reset pin to 1
-    wait_ms(1);//Wait another millisecond
+//    myled2= 0;//Set LED4 to 0
+//    wait_ms(1);//Wait at least one millisecond
+//    rst1 = 1;//Set reset pin to 1
+//    wait_ms(1);//Wait another millisecond
 
     while (1) {//Neverending Loop
-        if (pc.readable()) {//Checking for serial comminication
+        //if (pc.readable()) {//Checking for serial comminication
             myled = 0; //Turn Led 3 Off
-            xbee1.putc(pc.getc()); //XBee write whatever the PC is sending
+            xbee1.putc('A'); //XBee write whatever the PC is sending
+            //xbee1.putc(pc.getc()); //XBee write whatever the PC is sending
+            wait_ms(1000);
             myled = 1; //Turn Led 3 on for succcessfull communication
-        }
+        //}
     }
 }
\ No newline at end of file
--- a/mbed.bld	Tue Sep 29 21:31:14 2009 +0000
+++ b/mbed.bld	Fri Nov 13 11:11:39 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/a0336ede94ce
+http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11
\ No newline at end of file