Voor Arne

Fork of ESP8266Interface by ESP8266

Files at this revision

API Documentation at this revision

Comitter:
blownelco
Date:
Mon Feb 06 08:18:23 2017 +0000
Parent:
49:5a4798ccba07
Commit message:
Voor Arne

Changed in this revision

ESP8266/ESP8266.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 5a4798ccba07 -r 3727afa4c1b5 ESP8266/ESP8266.cpp
--- a/ESP8266/ESP8266.cpp	Mon Dec 05 15:36:40 2016 +0000
+++ b/ESP8266/ESP8266.cpp	Mon Feb 06 08:18:23 2017 +0000
@@ -45,7 +45,8 @@
 
 DigitalOut led4(PTA14); // RGB LED
 DigitalOut led3(PTA13); // RGB LED
-RawSerial pc(USBTX, USBRX); // Serial interface
+//RawSerial pc(USBTX, USBRX); // Serial interface
+
 
 ESP8266 * ESP8266::inst;
 char* ip = NULL;
@@ -85,17 +86,17 @@
     if( sendCommand( cmd.c_str(), "OK", NULL, 10000) ) {
         // successfully joined the network
         state.associated = true;
-        pc.printf("connected");
+        //pc.printf("connected");
         //INFO("ssid: %s, phrase: %s", this->ssid, this->phrase);
         return true;
     }
-    pc.printf(" not connected");
+    //pc.printf(" not connected");
     return false;
 }
 
 bool ESP8266::connect()
 {
-    pc.printf("connect");
+    //pc.printf("connect");
     //sendCommand("AT+CWDHCP=1,1","OK",NULL,1000); // DHCP Enabled in Station Mode
     return ESP8266::join();
 }
@@ -240,14 +241,14 @@
 */
 char* ESP8266::getIPAddress()
 {
-    pc.printf("getting ip\n");
+    //pc.printf("getting ip\n");
     char result[30] = {0};
     int check = 0;
     check = sendCommand("AT", "OK", NULL, 1000);
-    pc.printf("\r\nReceivedInfo for IP Command is: %s\r\n",result);
+    //pc.printf("\r\nReceivedInfo for IP Command is: %s\r\n",result);
     
     check = sendCommand("AT+CIFSR", NULL, result, 3000);
-    pc.printf("\r\nReceivedInfo for IP Command is: %s\r\n",result);    
+    //pc.printf("\r\nReceivedInfo for IP Command is: %s\r\n",result);    
     
     
     //ip = ipString;
@@ -298,9 +299,9 @@
 
 void ESP8266::reset()
 {
-    reset_pin = 0;
-    wait_us(20);
-    reset_pin = 1;
+ //   reset_pin = 0;
+ //   wait_us(20);
+ //   reset_pin = 1;   // MAGENTO SENSOR WERKT NIET MEER ALS DIT AANSTAAT
     led4 = 1;
     //wait(1);
     //reset_pin = !reset_pin
@@ -434,7 +435,7 @@
                 return -1;
             } else if (readable()) {
                 read = getc();
-                pc.putc(read); //debug echo
+                //pc.putc(read); //debug echo
                 if ( read != '\r' && read != '\n') {
                     checking += read;
                     found = checking.find(ACK);