ryo seki / Mbed 2 deprecated serialSend5

Dependencies:   TextLCD mbed

Revision:
0:62ac378df546
Child:
1:ed00e9c4ba6e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Apr 19 09:14:08 2013 +0000
@@ -0,0 +1,60 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "main.h"
+
+
+int a;
+int xbee;
+
+void init()
+{
+    device.printf("START");
+    device2.printf("START"); 
+    device.attach(&dev_tx,Serial::TxIrq);
+    device.attach(&dev_rx,Serial::RxIrq);
+    device2.attach(&dev2_tx,Serial::TxIrq);
+    device2.attach(&dev2_rx,Serial::RxIrq);
+    Button.mode(PullUp);
+    
+    timer2.start();
+    
+    lcd.cls();
+}
+int main() 
+{
+    init();
+    
+    for(;;){
+        //mbedleds = 0;
+        
+        
+        Ultrasonic();
+        //lcd.cls();
+        
+        IR_Position();
+        lcd.cls();
+        
+        lcd.locate(0,0);
+        lcd.printf("R:%d,F:%d",(int)ultrasonicValue[1],(int)ultrasonicValue[0]);
+        lcd.locate(0,1);
+        lcd.printf("L:%d,B:%d",(int)ultrasonicValue[3],(int)ultrasonicValue[2]);
+        
+        /*
+        lcd.locate(0,0);
+        lcd.printf("%d",(data[0] << 8) + data[1]);
+        lcd.locate(0,1);
+        lcd.printf("%d",data[2]);
+        */
+        /*
+        lcd.locate(0,0);
+        lcd.printf("%d,%d",direction,data[2]);
+        lcd.locate(0,1);
+        lcd.printf("%d",Distance);
+        */
+        /*
+        lcd.locate(0,0);
+        lcd.printf("%d",data[0]);
+        lcd.locate(0,1);
+        lcd.printf("%d",data[1]);*/
+    }
+}