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!