Issue verifying code in IOT Cloud for Arduino MKR WiFi 1010

Hi. I'm following this tutorial: Arduino User Profile
But when I try to verify, I get this errors:


Start verifying
/tmp/arduino-build-2DE2115893AC8584B5BE28D27749763F/sketch/objs.a(Untitled_jun23a.ino.cpp.o): In function `initProperties()':
/tmp/3518279951/Untitled_jun23a/thingProperties.h:20: undefined reference to `onAltitudeChange()'
/tmp/3518279951/Untitled_jun23a/thingProperties.h:20: undefined reference to `onPressureChange()'
collect2: error: ld returned 1 exit status
Multiple libraries were found for "Adafruit_GFX.h"
  Used: /home/builder/opt/libraries/adafruit_gfx_library_1_11_5
  Not used: /home/builder/opt/libraries/dfrobot_rgbmatrix_1_0_1
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
Multiple libraries were found for "ArduinoECCX08.h"
  Used: /home/builder/opt/libraries/arduinoeccx08_1_3_7
  Not used: /home/builder/opt/libraries/rak5814_atecc608a_1_0_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_0
Multiple libraries were found for "Adafruit_ST7735.h"
  Used: /home/builder/opt/libraries/adafruit_st7735_and_st7789_library_1_10_0
  Not used: /home/builder/opt/libraries/vega_st7735_and_st7789_1_0_0
Error during build: exit status 1

/tmp/arduino-build-2DE2115893AC8584B5BE28D27749763F/sketch/objs.a(Untitled_jun23a.ino.cpp.o): In function `initProperties()':
/tmp/3518279951/Untitled_jun23a/thingProperties.h:20: undefined reference to `onAltitudeChange()'
/tmp/3518279951/Untitled_jun23a/thingProperties.h:20: undefined reference to `onPressureChange()'
collect2: error: ld returned 1 exit status
Multiple libraries were found for "Adafruit_GFX.h"
  Used: /home/builder/opt/libraries/adafruit_gfx_library_1_11_5
  Not used: /home/builder/opt/libraries/dfrobot_rgbmatrix_1_0_1
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
Multiple libraries were found for "ArduinoECCX08.h"
  Used: /home/builder/opt/libraries/arduinoeccx08_1_3_7
  Not used: /home/builder/opt/libraries/rak5814_atecc608a_1_0_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_0
Multiple libraries were found for "Adafruit_ST7735.h"
  Used: /home/builder/opt/libraries/adafruit_st7735_and_st7789_library_1_10_0
  Not used: /home/builder/opt/libraries/vega_st7735_and_st7789_1_0_0
Error during build: exit status 1

The main issue is:

you have to check the code of this file

Hi @bryanemanuel. An important step was left out of the tutorial. When you add a Cloud Variable to your Thing, you can configure the whether the Cloud Variable should be "Read & Write" or "Read Only". The default value of the setting is "Read & Write", but the code in the tutorial was written for use with "Read Only" Cloud Variables. So it is necessary to select "Read Only" when adding the Cloud Variable, but the tutorial doesn't mention that.

I'll provide instructions you can follow to correctly configure the Cloud Variables in your Thing:

  1. Click the following link to open the "Things" page on Arduino IoT Cloud:
    https://create.arduino.cc/iot/things
  2. From the list of Things on the page, click on the Thing you created while following the tutorial.
    The "Setup" tab of the Thing page will open.
  3. Click on the "altitude" variable in the list of Cloud Variables in the Thing page.
    The "Variable Info" dialog will open.
  4. Click the "EDIT VARIABLE" link at the bottom of the "Variable Info" dialog.
    The "Edit Variable" dialog will open.
  5. Select the "Read Only" radio button under the "Variable Permission" section of the "Edit Variable" dialog.
  6. Click the "SAVE" button at the bottom of the dialog.
  7. Click on the "pressure" variable in the list of Cloud Variables on the Thing page.
    The "Variable Info" dialog will open.
  8. Click the "EDIT VARIABLE" link at the bottom of the "Variable Info" dialog.
    The "Edit Variable" dialog will open.
  9. Select the "Read Only" radio button under the "Variable Permission" section of the "Edit Variable" dialog.
  10. Click the "SAVE" button at the bottom of the dialog.
  11. Select the "Sketch" tab on the Thing page.
  12. Click the Verify and upload button at the top of the sketch editor.

Hopefully this time the Thing sketch will successfully compile and upload to your Arduino board.

1 Like

It worked perfectly. Thanks a lot for your detailed explanation!

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

Regards,
Per

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