Dependencies:   Motor

(notes)

Revision:
33:820a1510cf2e
Parent:
32:8a7a72c360ed
Child:
34:7989a5914d7d
--- a/main.cpp	Thu Dec 13 01:03:22 2018 +0000
+++ b/main.cpp	Thu Dec 13 01:28:11 2018 +0000
@@ -1,6 +1,4 @@
 #include "mbed.h"
-//#include "TCPSocket.h"
-#include "ESP8266Interface.h"
 #include "Motor.h"
 #include "rgbled.h"
 #include "rgbSensor.h"
@@ -112,7 +110,7 @@
         else if(C_value < t && R_value > t && G_value < t && B_value < t) {     //Check if cart reaches next checkpoint. cstate is set to 1 upon seeing first color of checkpoint
             victory = true;
         }
-        pc.printf("[C: %d, R: %d, G: %d, B: %d]", C_value, R_value, G_value, B_value); 
+        pc.printf("[C: %d, R: %d, G: %d, B: %d]\r\n", C_value, R_value, G_value, B_value); 
         ThisThread::sleep_for(500);
     }
 }
@@ -161,19 +159,6 @@
 
 int main() {
     pc.printf("Initializing ");
-    /*
-    // Connect to Wifi
-    int ret = wifi.connect(MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD, NSAPI_SECURITY_WPA_WPA2);
-    if (ret != 0) {
-        pc.printf("\r\nConnection error\r\n");
-    } else {
-        printf("Success\r\n\r\n");
-        printf("MAC: %s\r\n", wifi.get_mac_address());
-        printf("IP: %s\r\n", wifi.get_ip_address());
-        printf("Netmask: %s\r\n", wifi.get_netmask());
-        printf("Gateway: %s\r\n", wifi.get_gateway());
-        printf("RSSI: %d\r\n\r\n", wifi.get_rssi());
-    }*/
     
     // Start threads
     thread1.start(check_RGB);
@@ -270,5 +255,4 @@
             }
         }
     }
-    wifi.disconnect();
 }
\ No newline at end of file