1

Example sketch does not compile, error message 'static void WiFiClass::init()' is private within this context IDE 1.8.13 Board Uno WiFi Dev Ed. I have been using this board for several years uploading to Thingspeak using UnoWiFiDevEd.h using Ciao. Now I am trying to use the UnoWiFiDevEdSerial1.h library but I can't even compile the example code below. Any suggestions?

/* WiFiLink example: WebClient https://github.com/jandrassy/arduino-library-wifilink */

#include <UnoWiFiDevEdSerial1.h> #include <WiFiLink.h>

char server[] = "arduino.cc"; boolean sendRequest = true;

WiFiClient client;

void setup() { Serial.begin(115200);

Serial1.begin(115200); Serial1.resetESP(); delay(3000); //wait while WiFiLink firmware connects to WiFi with Web Panel settings

WiFi.init(&Serial1); while (WiFi.status() != WL_CONNECTED) { delay(10); } Serial.println("You're connected to the network"); printWifiStatus(); Serial.println(); }

void loop() { if (sendRequest) {

/Users/mack/Documents/Arduino/UnoWiFiLink_DevEd/UnoWiFiLink_DevEd.ino: In function 'void setup()': UnoWiFiLink_DevEd:21:8: error: 'static void WiFiClass::init()' is private within this context WiFi.init(&Serial1); ^~~~ In file included from /Users/mack/Documents/Arduino/UnoWiFiLink_DevEd/UnoWiFiLink_DevEd.ino:7:0: /Users/mack/Documents/Arduino/libraries/WiFi_Link/src/WiFiLink.h:44:17: note: declared private here static void init(); ^~~~ UnoWiFiLink_DevEd:21:21: error: no matching function for call to 'WiFiClass::init(UnoWiFiDevEdSerial1*)' WiFi.init(&Serial1); ^ In file included from /Users/mack/Documents/Arduino/UnoWiFiLink_DevEd/UnoWiFiLink_DevEd.ino:7:0: /Users/mack/Documents/Arduino/libraries/WiFi_Link/src/WiFiLink.h:44:17: note: candidate: static void WiFiClass::init() static void init(); ^~~~ /Users/mack/Documents/Arduino/libraries/WiFi_Link/src/WiFiLink.h:44:17: note: candidate expects 0 arguments, 1 provided Using library Uno_WiFi_Developer_Edition_Serial1 at version 1.0.4 in folder: /Users/mack/Documents/Arduino/libraries/Uno_WiFi_Developer_Edition_Serial1 Using library WiFi_Link at version 1.0.1 in folder: /Users/mack/Documents/Arduino/libraries/WiFi_Link Using library Wire at version 1.0 in folder: /private/var/folders/5v/dc3kh_4136g2j560dgjg3vww0000gn/T/AppTranslocation/E151A1AA-2F37-45B4-9B3C-A69070247D9C/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire exit status 1 'static void WiFiClass::init()' is private within this context

3
  • @Juraj ping - sounds like one for you...
    – Majenko
    Commented Aug 9, 2020 at 15:23
  • you have the Library Manager version of the WiFiLink library. it doesn't allow to specify a Serial interface and has SC converter library included. use the version from the GitHub repo you linked. did you change the firmware?
    – Juraj
    Commented Aug 9, 2020 at 15:24
  • it is documented here: github.com/jandrassy/…
    – Juraj
    Commented Aug 9, 2020 at 18:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.