This program is used to control the car remotely via telnet using wifi.

Dependencies:   C12832_lcd WiflyInterface mbed

Fork of Mode-3_Remote_Control by Bhakti Kulkarni

Files at this revision

API Documentation at this revision

Comitter:
bhakti08
Date:
Mon Jun 09 23:32:35 2014 +0000
Parent:
5:62cd993d82a6
Child:
7:7f0988b083cb
Commit message:
Mode 3;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jun 06 23:47:18 2014 +0000
+++ b/main.cpp	Mon Jun 09 23:32:35 2014 +0000
@@ -4,17 +4,17 @@
 #include <string.h>
  
 #define ECHO_SERVER_PORT   7
-#define FWD 8
+#define FWD 3
 #define REV 4
-#define LEFT 3
-#define RIGHT 1
-#define STOP 2
-#define STRAIGHT_WHEEL 7
+#define LEFT 1
+#define RIGHT 2
+#define STOP 0
+#define STRAIGHT_WHEEL 5
  
  
 PwmOut servo(p22);
 DigitalOut dir(LED1);
-BusOut motor(p5,p6,p7,p8);
+BusOut motor(p5,p6,p7);
  
 //#define FWD 1
 //#define REV 0
@@ -49,7 +49,8 @@
     printf("\nWait for new connection...\n");
     TCPSocketConnection client;
     server.accept(client);
- 
+    printf("Server accept\r\n");
+    
     char buffer[256];
     servo.period_us(50);
     motor = STOP;