logo elektroda
logo elektroda
X
logo elektroda

ESP8266 Arduino - invalid conversion error from 'const char*' to 'char*'

krzysiekwfd 2130 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16433316
    krzysiekwfd
    Level 11  
    Good afternoon I have a problem with the code because the Arduino is throwing me errors even though the program is well written, so please help :)

    error
    Code: C / C++
    Log in, to see the code
    error


    entire programme
    Spoiler:


    Code: C / C++
    Log in, to see the code
    .
  • ADVERTISEMENT
  • #2 16433445
    Anonymous
    Anonymous  
  • ADVERTISEMENT
  • Helpful post
    #3 16433768
    grko
    Level 33  
    Piotrus_999 wrote:
    As you can see, it is not.


    It just so happens that the programme is well-written, only the API for this WiFi is wrong. It was probably written by some opponent of const.

    Piotrus_999 wrote:
    .
    And a simple tip: throw out the "const"


    This simple advice will not work. The compilation error will appear elsewhere. The solution is:
    1. casting when calling WiFi.begin
    2. declare ssid and password as arrays. As in the examples:
    https://www.arduino.cc/en/Reference/WiFiConfig
  • #4 16439883
    krzysiekwfd
    Level 11  
    thanks, it's working fine now :) but I have one more question how can I connect several ESP modules together so that one is the main module to which all the data from the other modules are sent and displayed on the server?
ADVERTISEMENT