blynk & neopixelring & w7500
Fork of WIZwiki-7500_Blynk by
Revision 18:bc3d69c01bf2, committed 2017-11-27
- Comitter:
- jcm931213
- Date:
- Mon Nov 27 11:49:08 2017 +0000
- Parent:
- 17:ba922c4e9aee
- Commit message:
- NeoPixel Ring Blynk Example final!!!
Changed in this revision
diff -r ba922c4e9aee -r bc3d69c01bf2 Adapters/BlynkEthernet.h --- a/Adapters/BlynkEthernet.h Mon Aug 14 04:44:54 2017 +0000 +++ b/Adapters/BlynkEthernet.h Mon Nov 27 11:49:08 2017 +0000 @@ -55,7 +55,7 @@ { int phy_link; eth.init(mac); - // phy link + do{ phy_link = eth.ethernet_link(); printf("..."); @@ -72,9 +72,10 @@ ::delay(1000); char* myip = eth.getIPAddress(); BLYNK_LOG_IP("IP:", myip); + printf("my IP : %s\r\n", myip); config(auth, domain, port); - printf("configure!\r\n"); + //printf("configure!\r\n"); while(this->connect() != true) {} } //
diff -r ba922c4e9aee -r bc3d69c01bf2 Adapters/BlynkMbedClient.h --- a/Adapters/BlynkMbedClient.h Mon Aug 14 04:44:54 2017 +0000 +++ b/Adapters/BlynkMbedClient.h Mon Nov 27 11:49:08 2017 +0000 @@ -52,9 +52,12 @@ } bool connect() { + //printf("mbedClientGen - connect function\r\n"); if (domain) { - BLYNK_LOG4(BLYNK_F("Connecting to "), domain, ':', port); + //BLYNK_LOG4(BLYNK_F("Connecting to "), domain, ':', port); + printf("Connectiong to %s : %d\r\n", domain, port); client->connect(domain, port); + //printf("TCP Socket Connection finish\r\n"); isConn = (1 == client->is_connected()); return isConn; } else { //if (uint32_t(addr) != 0) { @@ -120,7 +123,7 @@ int available() { YIELD_FIX(); //printf("readable : %d, sock: %d\r\n", eth->wait_readable(_sock_fd, 3000000, 0),_sock_fd); //return eth->wait_readable(_sock_fd, 300000, 0); - return eth->wait_readable(client->getsock() , 1000*60*5, 0); + return eth->wait_readable(client->getsock() , 1000*60*10, 0); } protected:
diff -r ba922c4e9aee -r bc3d69c01bf2 Blynk/BlynkProtocol.h --- a/Blynk/BlynkProtocol.h Mon Aug 14 04:44:54 2017 +0000 +++ b/Blynk/BlynkProtocol.h Mon Nov 27 11:49:08 2017 +0000 @@ -153,20 +153,20 @@ bool BlynkProtocol<Transp>::run(bool avail) { BLYNK_RUN_YIELD(); - printf("debuging...............1\r\n"); + //printf("debuging...............1\r\n"); if (state == DISCONNECTED) { return false; } const bool tconn = conn.connected(); - printf("debuging...............2\r\n"); + //printf("debuging...............2\r\n"); if (tconn) { if (avail || conn.available() > 0) { - printf("debuging...............3\r\n"); + //printf("debuging...............3\r\n"); //BLYNK_LOG2(BLYNK_F("Available: "), conn.available()); //const unsigned long t = micros(); if (!processInput()) { - printf("debuging...............4\r\n"); + // printf("debuging...............4\r\n"); conn.disconnect(); // TODO: Only when in direct mode? #ifdef BLYNK_USE_DIRECT_CONNECT @@ -175,7 +175,7 @@ BlynkOnDisconnected(); return false; } - printf("debuging...............5r\n"); + //printf("debuging...............5r\n"); //BLYNK_LOG2(BLYNK_F("Proc time: "), micros() - t); } }