Thing will not compile with MKR IoT Carrier library

I've been having some difficulty figuring out how to get simple sketches to compile on the Arduino cloud editor. I've been tasked with doing some IoT explorations for a class.

I am using a MKR Wifi 1010 board, with the MKR IoT Carrier REV2 board attached.

I started to follow the basic sensor tutorials in the IoT rev2 kit course -- i.e. adding one or two cloud variables, creating a simple dashboard, etc. I had no serious problems with this until about 2 pm today. At some point, the include file <Arduino_MKRIoTCarrier.h> stopped compiling. I've been all over the forums, and I suspect it has to do with the BSEC library, but the only suggested fix does not do anything. I've tried everything I could find, different computers, creating new Things, deleting and adding new devices, but from that point onward anything involving that header has stopped compiling.

I am currently working with a newly created Thing with no additional variables added and no dashboard attached. The Thing sketch is completely auto-generated. The default newly created sketch will compile without problems (as shown below). If I uncomment line 20, the sketch will not compile. This is devastating, as even the most basic tutorial using the MKR IoT Carrier board requires this library to be included.

/* 
  Sketch generated by the Arduino IoT Cloud Thing "Untitled 5"
  https://create.arduino.cc/cloud/things/0d60b7b2-6c5d-4a18-a3a4-26d96257083b 

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  - No variables have been created, add cloud variables on the Thing Setup page
    to see them declared here

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"
//#include <Arduino_MKRIoTCarrier.h>

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  
  
}


When I uncomment "#include <Arduino_MKRIoTCarrier.h>", I get the following compilation errors:

/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld:/mnt/create-efs/webide/b1/86/b186a6712cbc6be6cb525dca94ea9685:enielsen/libraries_v2/Arduino_MKRIoTCarrier/src/cortex-m0plus/libalgobsec.a: file format not recognized; treating as linker script

/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld:/mnt/create-efs/webide/b1/86/b186a6712cbc6be6cb525dca94ea9685:enielsen/libraries_v2/Arduino_MKRIoTCarrier/src/cortex-m0plus/libalgobsec.a:0: syntax error

collect2: error: ld returned 1 exit status

Multiple libraries were found for "Adafruit_I2CDevice.h"

Used: /home/builder/opt/libraries/adafruit_busio_1_15_0

Not used: /home/builder/opt/libraries/vegaiot_busio_1_0_0

Multiple libraries were found for "Adafruit_ST7735.h"

Used: /home/builder/opt/libraries/adafruit_st7735_and_st7789_library_1_10_3

Not used: /home/builder/opt/libraries/vega_st7735_and_st7789_1_0_0

Multiple libraries were found for "Wire.h"

Used: /home/builder/.arduino15/packages/arduino/hardware/samd/1.8.13/libraries/Wire

Not used: /home/builder/opt/libraries/flexwire_1_2_0

Multiple libraries were found for "Adafruit_GFX.h"

Used: /home/builder/opt/libraries/adafruit_gfx_library_1_11_9

Not used: /home/builder/opt/libraries/dfrobot_rgbmatrix_1_0_1

Multiple libraries were found for "Arduino_PMIC.h"

Used: /home/builder/opt/libraries/arduino_bq24195_0_9_2

Not used: /home/builder/opt/libraries/arduino_pf1550_0_2_0

Multiple libraries were found for "WiFiNINA.h"

Used: /home/builder/opt/libraries/wifinina_1_8_14

Not used: /home/builder/opt/libraries/vega_wifinina_1_0_1

Multiple libraries were found for "ArduinoECCX08.h"

Used: /home/builder/opt/libraries/arduinoeccx08_1_3_8

Not used: /home/builder/opt/libraries/rak5814_atecc608a_1_0_0

Multiple libraries were found for "Arduino_MKRIoTCarrier.h"

Used: /mnt/create-efs/webide/b1/86/b186a6712cbc6be6cb525dca94ea9685:enielsen/libraries_v2/Arduino_MKRIoTCarrier

Not used: /home/builder/opt/libraries/arduino_mkriotcarrier_2_0_4

Multiple libraries were found for "SPI.h"

Used: /home/builder/.arduino15/packages/arduino/hardware/samd/1.8.13/libraries/SPI

Not used: /home/builder/opt/libraries/eventethernet_1_0_0

Error during build: exit status 1

Just as a sanity check, I've tried following the instructions for this tutorial exactly, down to creating a single float humidity variable and reading from the carrier.Env object to get the humidity. This also fails to compile, with the same message. It's so strange, because as of 1 pm today, this exact sketch was compiling and running without problems, and the Thing would communicate with the dashboard just fine. It feels like there is some internal state that the cloud editor is not revealing to me that got screwed up, like perhaps a library version got set incorrectly, but all of that state is hidden from me. In comparison, if I use the local Arduino 2.0 IDE to upload a basic example IoT Carrier board blink sketch, I have no problems at all!

1 Like

Hi @enielsen.

We see here that you have imported a copy of the "Arduino_MKRIoTCarrier" to your Arduino Cloud account. That imported copy is being used instead of the pre-installed library from Library Manager.

Please provide some information about the imported library.

Was there a specific reason you imported that library to Arduino Cloud instead of just using the pre-installed library?

Where did you get the library you imported from?

1 Like

Frankly, I do not know. I’d like to know myself how to see what has actually been imported or is being used, but I have not been able to figure that out in the cloud editor interface. Can you help direct me where to look?

Best,
Erik

OK, then I think the best way forward will be to delete that library from your account. If you don't know why you imported it then it can't be anything of value and it is only causing problems.

I'll provide instructions you can follow to do that:

  1. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login

  2. Click the following link to open the list of your Arduino Cloud sketches in the web browser:
    https://app.arduino.cc/sketches

  3. Click on any sketch, or use the CREATE > New sketch button to create a new sketch.
    The sketch will open in Arduino Cloud Editor.

  4. Click the icon that looks like shelved books ("Libraries") in the bar on the left side of the Cloud Editor page.
    The "Libraries" panel will open.

  5. Select the "Custom" tab from the "Libraries" panel.

  6. You will see a line of text at the top of the "CUSTOM" tab:

    Showing libraries for:
    <board name>

    (where <board name> is the name of the board you have selected in Arduino Cloud Editor)
    Click the board name in that line of text.
    The text will now change to:

    Showing libraries for:
    ALL DEVICES

  7. Scroll down through the list of custom libraries until you find the entry for the "Arduino_MKRIoTCarrier" library.

  8. Click the icon to the right of the library name.
    A menu will open.

  9. Select "Delete Library" from the menu.
    A "Delete custom library" dialog will open.

  10. Click the "YES, DELETE" button in the dialog.

2 Likes

Perfect, that worked; thank you for taking the time to communicate so clearly to me.

1 Like

You are welcome. I'm glad it is working now.

About this part of your previous reply:

After following the instructions for deleting the imported library, is the procedure for accessing the full list of libraries you have imported now clear to you?

Yes, thank you very much.

1 Like

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