tzapu / WiFiManager

ESP8266 WiFi Connection manager with web captive portal
http://tzapu.com/esp8266-wifi-connection-manager-library-arduino-ide/
MIT License
6.63k stars 1.98k forks source link

Thingspeak and wifi manager #473

Open jgarridc opened 6 years ago

jgarridc commented 6 years ago

#

liebman commented 6 years ago

I am assuming that your JSON config file specifies the value as a number and not a string, a string would be a quoted value - see this example: https://github.com/bblanchon/ArduinoJson/blob/master/examples/JsonParserExample/JsonParserExample.ino

FYI - this has nothing to do with WiFiManager.

jgarridc commented 6 years ago

How its possible to convert the unsigned long to a char*?

liebman commented 6 years ago

Again I'll make an assumption. That this line is the one you get the error for:

ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);

Again, this is totally unrelated to WiFiManager and should be handled in a forum related to ThingSpeak. In any case the issue is that your passing a character array, 'myChannelNumber', to a function that expects an integer of some size.

There are functions that will convert these for you:

as well as other methods to do this conversion. Some google searches for "string to int c" or "string to int c++" can give you more information.

FYI: You have marked many lines with "here I have the problem" without indicating the exact line that produced the error. And the formatting is almost unreadable.

jgarridc commented 6 years ago

OK, thanks a lot, sorry but I am not a programmer and I have a lot of problems with the code, but all help its good. I am goin to look for information about your answer and try, thank you very much,.