Hello! This is a project my group is doing in our high school engineering class. We are trying to connect our serial monitor output to Google Sheets so we don't just have to copy and paste it from the serial monitor. I put part of the example code into the main code we are using, and I also tried to run just the example code, and both did not work, saying this:
Looks like you're missing a library. Do you know how to locate the library? Did you download it at home but not at school, for example? Is the library one of those managed by Library Manager, in the IDE? There's so much we don't know about your particular situation, that's about all I can say.
I do not know which library I'm supposed to use, but I did include the GSheet32 library and it automatically put in "#include ". I also looked in the file and opened another file called GSheet32.cpp and that is where the error is coming from. The whole project is basically using a Huskylens camera for Arduino with an Arduino Mega board and getting it to track an object (our end goal is to track a soccer ball and develop a heat map for goalie training), which we are then trying to stream the data from the serial monitor output onto Google Sheets so it can be moved into MatLab (which we already figured out how to do the Matlab portion). There are also 2 pushbuttons that allow us to manually input whether the object (in this case the soccer ball) was blocked or not. If you know a better way to live stream the data from the serial monitor into Google Sheets, then I will do it instead of this, because I can't get past the Wifi.h error. If not, then I hope this information helps.
Are you using the Arduino Mega 2560 AVR board? If so, you don't have wifi and that library won't be available. It looks like that project was for an ESP8266 or ESP32.
oh crap you're right. Do you have any other ways to take data live from the serial monitor and put it in google sheets? could I use an arduino uno instead?
An Uno board doesn't have Wifi either. You don't need the Arduino Serial Monitor to capture the data. Any terminal program will work as well (Teleterm, etc.) and those programs allow you to save the output to a file (locally on your PC) which may be an easy solution to just import that file into your google spreadsheet.
Will it connect to Google Sheets and continuously stream the data there while the program is still running, or will it only work once the program is stopped? I need it to stream live, so the goalie can continuously see the data while they are still training.
Then get yourself an ESP8266 or ESP32 which has wifi and move your project to that board. Put your Uno and Mega back on the shelf for some other project.
Depends on how much you want to spend. The ESP32 is new, more powerful but costs more. Either will work [you have not said what data you are trying to send - sensors connected?]
WARNING: library GSheet32 claims to run on esp32 architecture(s) and may be incompatible with your current board which runs on renesas_uno architecture(s).
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:5:1: error: 'HTTPClient' does not name a type; did you mean 'HttpClient'?
HTTPClient http;
^~~~~~~~~~
HttpClient
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp: In member function 'void GSheet32::connectWiFi(const char*, const char*)':
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:22:42: error: invalid operands of types 'const char [23]' and 'const char*' to binary 'operator+'
Serial.print("Succes!! Connect to : "+WiFi.SSID());
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp: In member function 'void GSheet32::sendData(arduino::String)':
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:27:5: error: 'http' was not declared in this scope
http.begin(url.c_str()); //Specify the URL and certificate
^~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:28:29: error: 'HTTPC_STRICT_FOLLOW_REDIRECTS' was not declared in this scope
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp: In member function 'void GSheet32::sendData(arduino::String, arduino::String)':
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:44:5: error: 'http' was not declared in this scope
http.begin(url.c_str()); //Specify the URL and certificate
^~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:45:29: error: 'HTTPC_STRICT_FOLLOW_REDIRECTS' was not declared in this scope
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp: In member function 'void GSheet32::sendData(arduino::String, arduino::String, arduino::String)':
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:61:5: error: 'http' was not declared in this scope
http.begin(url.c_str()); //Specify the URL and certificate
^~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:62:29: error: 'HTTPC_STRICT_FOLLOW_REDIRECTS' was not declared in this scope
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp: In member function 'void GSheet32::sendData(arduino::String, arduino::String, arduino::String, arduino::String)':
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:78:5: error: 'http' was not declared in this scope
http.begin(url.c_str()); //Specify the URL and certificate
^~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:79:29: error: 'HTTPC_STRICT_FOLLOW_REDIRECTS' was not declared in this scope
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp: In member function 'void GSheet32::sendData(arduino::String, arduino::String, arduino::String, arduino::String, arduino::String)':
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:95:5: error: 'http' was not declared in this scope
http.begin(url.c_str()); //Specify the URL and certificate
^~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:96:29: error: 'HTTPC_STRICT_FOLLOW_REDIRECTS' was not declared in this scope
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp: In member function 'void GSheet32::clearData()':
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:112:5: error: 'http' was not declared in this scope
http.begin(url.c_str()); //Specify the URL and certificate
^~~~
C:\Users\william.randolph_stu\Documents\Arduino\libraries\GSheet32\GSheet32.cpp:113:29: error: 'HTTPC_STRICT_FOLLOW_REDIRECTS' was not declared in this scope
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
Compilation error: exit status 1