Chat freely about anything...

User avatar
By Leandro Silva
#16493
ArnieO wrote:
Leandro Silva wrote:It won't print into my serial port. But if I remove "WiFiClient client;" from the begining of my scketch, it works OK (If I remove every reference to "client").

I think ESP8266WiFi.h should replace WiFiClient.h when using the ESP8266. I don't think you should use both.


I didn't realize that those libraries are ambiguous.. Thank you for that.

Looks like the problem isn't with Wifi libraries... I just noticed these warnings:

Code: Select all/home/leandro/arduino-1.6.1/libraries/HMC5883L/HMC5883L.cpp: In member function 'uint8_t* HMC5883L::Read(int, int)':
/home/leandro/arduino-1.6.1/libraries/HMC5883L/HMC5883L.cpp:124:11: warning: address of local variable 'buffer' returned [-Wreturn-local-addr]
   uint8_t buffer[length];
           ^
In file included from /home/leandro/arduino-1.6.1/libraries/HMC5883L/HMC5883L.cpp:24:0:
/home/leandro/arduino-1.6.1/libraries/HMC5883L/HMC5883L.cpp: In member function 'char* HMC5883L::GetErrorText(int)':
/home/leandro/arduino-1.6.1/libraries/HMC5883L/HMC5883L.h:41:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define ErrorCode_1 "Entered scale was not valid, valid gauss values are: 0.88, 1.3, 1.9, 2.5, 4.0, 4.7, 5.6, 8.1"
                     ^
/home/leandro/arduino-1.6.1/libraries/HMC5883L/HMC5883L.cpp:140:10: note: in expansion of macro 'ErrorCode_1'
   return ErrorCode_1;
          ^
/home/leandro/arduino-1.6.1/libraries/HMC5883L/HMC5883L.cpp:142:9: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
  return "Error not defined.";