mobile robot control with artificial hormones

Dependencies:   Communication_Robot RTC-DS1307 iSerial mbed

Fork of Andante_v00 by potiwat ngamkajornwiwat

Revision:
2:b31c4677ebc0
Parent:
0:95d17607a698
Child:
3:12f2ee26a43f
diff -r d1ecf6e32706 -r b31c4677ebc0 main.cpp
--- a/main.cpp	Sat Feb 28 16:30:28 2015 +0000
+++ b/main.cpp	Sun Mar 01 08:50:37 2015 +0000
@@ -2,6 +2,11 @@
 #include "param.h"
 #include "pin_config.h"
 
+#include "iSerial.h"
+//#include "protocol.h"
+#include "communication.h"
+
+
 //control stearing
 PwmOut heading_front(PIN_FRONT_SERVO);
 PwmOut heading_rear(PIN_REAR_SERVO);
@@ -23,11 +28,18 @@
 }
 void Init_communication()
 {
-    iSerial pan_a(TX_PAN_A, RX_PAN_A); // tx, rx
-    iSerial pan_b(TX_PAN_B, RX_PAN_B); // tx, rx
+    COMMUNICATION pan_a(TX_PAN_A, RX_PAN_A,115200,1000,1000); // tx, rx
+    COMMUNICATION pan_b(TX_PAN_B, RX_PAN_B,115200,1000,100); // tx, rx
+
+}
 
-    pan_a.baud(115200);
-    pan_b.baud(115200);
+void setControl()
+{
+
+}
+
+void getSensor()
+{
 
 }
 
@@ -37,19 +49,16 @@
     Samping.attach(&getSensor,TIMER_SAMPING);
 }
 
-void setControl()
-{
 
-}
+
 
-void getSensor()
-{
-    
-}
+
+
 
 int main()
 {
     Init_communication();
     Init_servo();
 
+    //pan_a.CommunicatePacket
 }