Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of XBee_read by
Revision 0:2eaf86314aea, committed 2010-06-04
- Comitter:
- alex89
- Date:
- Fri Jun 04 10:23:38 2010 +0000
- Child:
- 1:0d6c92c1ed38
- Commit message:
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 Fri Jun 04 10:23:38 2010 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+Serial xbee1(p9, p10);
+DigitalOut rst1(p11);
+
+DigitalOut myled(LED1);
+DigitalOut myled2(LED2);
+
+TextLCD lcd(p16, p15, p14, p17, p18, p19, p20); // rs, rw, e, d0, d1, d2, d3
+
+int main() {
+ rst1 = 0; //Set reset pin to 0
+ myled = 0;
+ myled2= 0;
+ wait_ms(1);
+ rst1 = 1; //Set reset pin to 1
+ wait_ms(1);
+
+ lcd.printf("starting");
+ wait(2);
+ lcd.cls();
+
+ int a = 0;
+ int prev = 0;
+
+ while (1) {
+
+ if(xbee1.readable()){
+ prev = a;
+ a = xbee1.getc(); //XBee read
+
+ if (a != prev){
+ if (a < 10){
+ lcd.printf("%d", a);
+ }
+ if (a == 254 || a == 253){
+ lcd.cls();
+ }
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Jun 04 10:23:38 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/029aa53d7323
