Error compiling for board Arduino MKR WiFi 1010

Hi!

We just got the Explore IoT Kit and we are trying to run the first lesson. We are having trouble compiling the first sketch of the lesson and we get the ‘Error compiling for board Arduino MKR WiFi 1010’ error when we try to verify the code.

We are using the board: Arduino MKR WiFi 1010
macOS Catalina 10.15.7

Could you help us troubleshoot this problem?

The details of the error message are:

Arduino: 1.8.12 (Mac OS X), Board: "Arduino MKR WiFi 1010"

libraries/Arduino_MKRIoTCarrier/Arduino_MKRIoTCarrier.cpp.o: In function `MKRIoTCarrier::begin()':
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier.cpp:50: undefined reference to `QtouchClass::setSensorsSensitivity(unsigned int)'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier.cpp:90: undefined reference to `TOUCH'
libraries/Arduino_MKRIoTCarrier/Arduino_MKRIoTCarrier_Qtouch.cpp.o: In function `MKRIoTCarrier_Qtouch_Manager::begin()':
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:87: undefined reference to `QtouchClass::begin()'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:88: undefined reference to `TOUCH'
libraries/Arduino_MKRIoTCarrier/Arduino_MKRIoTCarrier_Qtouch.cpp.o: In function `MKRIoTCarrier_Qtouch_Manager::update()':
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:93: undefined reference to `QtouchClass::poll()'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:94: undefined reference to `QtouchClass::available()'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:95: undefined reference to `QtouchClass::read(int)'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:96: undefined reference to `QtouchClass::read(int)'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:97: undefined reference to `QtouchClass::read(int)'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:98: undefined reference to `QtouchClass::read(int)'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:99: undefined reference to `QtouchClass::read(int)'
/Users/lobo/Documents/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier_Qtouch.cpp:101: undefined reference to `TOUCH'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino MKR WiFi 1010.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

And here is the sketch


#include <Arduino_MKRIoTCarrier_Qtouch.h>
#include <Arduino_MKRIoTCarrier.h>
#include <Arduino_MKRIoTCarrier_Buzzer.h>
#include <Arduino_MKRIoTCarrier_Relay.h>

MKRIoTCarrier carrier;

float temperature = 0;
float humidity = 0;

void setup() {
 Serial.begin(9600);
 while (!Serial);
 CARRIER_CASE = false;
 carrier.begin();
}

void loop() {
 temperature = carrier.Env.readTemperature();
 humidity = carrier.Env.readHumidity();

 carrier.Buttons.update();

 Serial.print("Temperature = ");
 Serial.print(temperature);
 Serial.println(" °C");

 Serial.print("Humidity = ");
 Serial.print(humidity);
 Serial.println(" %");
}
void printTemperature() {
 carrier.display.fillScreen(ST77XX_RED);
 carrier.display.setTextColor(ST77XX_WHITE);
 carrier.display.setTextSize(6);

 carrier.display.setCursor(20, 110);
 carrier.display.print("Temp: ");
 carrier.display.print(temperature);
 carrier.display.println(" C");
}

void printHumidity() {
 carrier.display.fillScreen(ST77XX_BLUE);
 carrier.display.setTextColor(ST77XX_WHITE);
 carrier.display.setTextSize(2);

 carrier.display.setCursor(20, 110);
 carrier.display.print("Humi: ");
 carrier.display.print(humidity);
 carrier.display.println(" %");
}

Thanks!

(Please use the Code tags button, </> on the menu, for posting code and messages like that. Thanks! Moderator)

I just ran it again and gave me this longer error message. See attachment.

MKRWiFi1010_ErrorMessage.txt (13.4 KB)

I have solved downloading Arduino_MCHPTouch from https://github.com/arduino-libraries/Arduino_MCHPTouch, unpacked in the same dir of […]/Arduino/libraries/Arduino_MKRIoTCarrier/src/ and include #include <Arduino_MCHPTouch.h> before#include <Arduino_MKRIoTCarrier.h> in your sketch.
Hope could help

Maybe, similar result is reacheable by official library by ide interface.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.