GreenHouse kit: The template doesn't compile succesfully

Hello, we are a school that just bought the kit. We have tried many thing to conncte the sensor an motors of the kit to the arduino, but nothing worked. We also try use the template but it gives a compile error, this:

/tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino: In function 'void setup()': /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:65:19: error: 'BME680_I2C_ADDR_PRIMARY' was not declared in this scope iaqSensor.begin(BME680_I2C_ADDR_PRIMARY, Wire); ^~~~~~~~~~~~~~~~~~~~~~~ /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:65:19: note: suggested alternative: 'BME68X_I2C_ADDR_HIGH' iaqSensor.begin(BME680_I2C_ADDR_PRIMARY, Wire); ^~~~~~~~~~~~~~~~~~~~~~~ BME68X_I2C_ADDR_HIGH /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino: In function 'void checkIaqSensorStatus()': /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:157:17: error: 'class Bsec' has no member named 'status'; did you mean 'bsecStatus'? if (iaqSensor.status != BSEC_OK) { ^~~~~~ bsecStatus /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:158:19: error: 'class Bsec' has no member named 'status'; did you mean 'bsecStatus'? if (iaqSensor.status < BSEC_OK) { ^~~~~~ bsecStatus /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:159:56: error: 'class Bsec' has no member named 'status'; did you mean 'bsecStatus'? output = "BSEC error code : " + String(iaqSensor.status); ^~~~~~ bsecStatus /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:164:58: error: 'class Bsec' has no member named 'status'; did you mean 'bsecStatus'? output = "BSEC warning code : " + String(iaqSensor.status); ^~~~~~ bsecStatus /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:168:17: error: 'class Bsec' has no member named 'bme680Status'; did you mean 'bme68xStatus'? if (iaqSensor.bme680Status != BME680_OK) { ^~~~~~~~~~~~ bme68xStatus /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:168:33: error: 'BME680_OK' was not declared in this scope if (iaqSensor.bme680Status != BME680_OK) { ^~~~~~~~~ /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:168:33: note: suggested alternative: 'BME68X_OK' if (iaqSensor.bme680Status != BME680_OK) { ^~~~~~~~~ BME68X_OK /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:169:19: error: 'class Bsec' has no member named 'bme680Status'; did you mean 'bme68xStatus'? if (iaqSensor.bme680Status < BME680_OK) { ^~~~~~~~~~~~ bme68xStatus /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:170:58: error: 'class Bsec' has no member named 'bme680Status'; did you mean 'bme68xStatus'? output = "BME680 error code : " + String(iaqSensor.bme680Status); ^~~~~~~~~~~~ bme68xStatus /tmp/2098531147/Greenhouse_Ventilation_may08a/Greenhouse_Ventilation_may08a.ino:175:60: error: 'class Bsec' has no member named 'bme680Status'; did you mean 'bme68xStatus'? output = "BME680 warning code : " + String(iaqSensor.bme680Status); ^~~~~~~~~~~~ bme68xStatus Multiple libraries were found for "ECCX08.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 "WiFiNINA.h" Used: /home/builder/opt/libraries/wifinina_1_8_14 Not used: /home/builder/opt/libraries/betterwifinina_1_3_0 Not used: /home/builder/opt/libraries/vega_wifinina_1_0_1 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 "Adafruit_I2CDevice.h" Used: /home/builder/opt/libraries/adafruit_busio_1_16_0 Not used: /home/builder/opt/libraries/vegaiot_busio_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 "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 "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_3_0 Error during build: exit status 1

Anyone know how we need to proceed?

Post a wiring diagram of your project.

Post your code, otherwise we won't know what you are doing .
To post code click the button on the toolbar.

If there is a library in the code, point out the link where you downloaded the library.

Can you check if the solution provided here works for you?

No, that solution didn't work. Here is the code (auto-generated by Arduino....) and the relative error. I'm using the web IoT editor.

/* 
  Sketch generated by the Arduino IoT Cloud Thing 

  Arduino IoT Cloud Variables description

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

  int humidity;
  int temperature;

  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 <Grove_I2C_Motor_Driver.h>
#include <Arduino_MKRIoTCarrier.h>
MKRIoTCarrier carrier;
Bsec iaqSensor;
String output;
float altitude(const int32_t press, const float seaLevel = 1013.25);
float  temp, hum, pres, iaq, iaq_accuracy, co2_eq, voc;

void setup() {
  Serial.begin(9600);
  Wire.begin();
  
    // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  //Get Cloud Info/errors , 0 (only errors) up to 4
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
 
  //Wait to get cloud connection to init the carrier
  while (ArduinoCloud.connected() != 1) {
    ArduinoCloud.update();
    delay(500);
  }
  delay(500);
  carrier.withCase();
  carrier.begin();
  delay(1500);
  
  iaqSensor.begin(BME680_I2C_ADDR_PRIMARY, Wire);
  output = "\nBSEC library version " + String(iaqSensor.version.major) + "." + String(iaqSensor.version.minor) + "." + String(iaqSensor.version.major_bugfix) + "." + String(iaqSensor.version.minor_bugfix);
  Serial.println(output);
  checkIaqSensorStatus();
  bsec_virtual_sensor_t sensorList[10] = {
    BSEC_OUTPUT_RAW_TEMPERATURE,
    BSEC_OUTPUT_RAW_PRESSURE,
    BSEC_OUTPUT_RAW_HUMIDITY,
    BSEC_OUTPUT_RAW_GAS,
    BSEC_OUTPUT_IAQ,
    BSEC_OUTPUT_STATIC_IAQ,
    BSEC_OUTPUT_CO2_EQUIVALENT,
    BSEC_OUTPUT_BREATH_VOC_EQUIVALENT,
    BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
    BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
  };
  iaqSensor.updateSubscription(sensorList, 10, BSEC_SAMPLE_RATE_LP);
  checkIaqSensorStatus();
  
}
void loop()
{
  ArduinoCloud.update();
  
  if (iaqSensor.run())
  { // If new data is available
    temp = iaqSensor.rawTemperature;
    hum = iaqSensor.rawHumidity;
    pres = iaqSensor.pressure;
    iaq =  iaqSensor.iaq;
    iaq_accuracy = iaqSensor.iaqAccuracy;
    co2_eq = iaqSensor.co2Equivalent;
    voc = iaqSensor.breathVocEquivalent;

  }
  else
  {
    checkIaqSensorStatus();
  }
  
  humidity = hum;
  temperature = temp;
  
/*
  Serial.println(".");
  Serial.println("Temperature[°C] | relative humidity[%] | Pressure[hPa] |");
  Serial.print("  ");
  Serial.print(temp);
  Serial.print("         |     ");
  Serial.print(hum);
  Serial.print("            |    ");
  Serial.print(pres);
  Serial.println("   |");
*/
  
}
// Helper function definitions
void checkIaqSensorStatus(void)
{
  if (iaqSensor.status != BSEC_OK) {
    if (iaqSensor.status < BSEC_OK) {
      output = "BSEC error code : " + String(iaqSensor.status);
      Serial.println(output);
      for (;;)
        errLeds(); /* Halt in case of failure */
    } else {
      output = "BSEC warning code : " + String(iaqSensor.status);
      Serial.println(output);
    }
  }
  if (iaqSensor.bme680Status != BME680_OK) {
    if (iaqSensor.bme680Status < BME680_OK) {
      output = "BME680 error code : " + String(iaqSensor.bme680Status);
      Serial.println(output);
      for (;;)
        errLeds(); /* Halt in case of failure */
    } else {
      output = "BME680 warning code : " + String(iaqSensor.bme680Status);
      Serial.println(output);
    }
  }
}
void errLeds(void)
{
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH);
  delay(100);
  digitalWrite(LED_BUILTIN, LOW);
  delay(100);
}
/usr/local/bin/arduino-cli compile --fqbn arduino:samd:mkrwifi1010 --build-cache-path /tmp --output-dir /tmp/1410486018/build --build-path /tmp/arduino-build-FEFE00663B26A9356EB994520BA1431C  /tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a

/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino: In function 'void setup()':
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:49:19: error: 'BME680_I2C_ADDR_PRIMARY' was not declared in this scope
   iaqSensor.begin(BME680_I2C_ADDR_PRIMARY, Wire);
                   ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:49:19: note: suggested alternative: 'BME68X_I2C_ADDR_HIGH'
   iaqSensor.begin(BME680_I2C_ADDR_PRIMARY, Wire);
                   ^~~~~~~~~~~~~~~~~~~~~~~
                   BME68X_I2C_ADDR_HIGH
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino: In function 'void checkIaqSensorStatus()':
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:108:17: error: 'class Bsec' has no member named 'status'; did you mean 'bsecStatus'?
   if (iaqSensor.status != BSEC_OK) {
                 ^~~~~~
                 bsecStatus
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:109:19: error: 'class Bsec' has no member named 'status'; did you mean 'bsecStatus'?
     if (iaqSensor.status < BSEC_OK) {
                   ^~~~~~
                   bsecStatus
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:110:56: error: 'class Bsec' has no member named 'status'; did you mean 'bsecStatus'?
       output = "BSEC error code : " + String(iaqSensor.status);
                                                        ^~~~~~
                                                        bsecStatus
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:115:58: error: 'class Bsec' has no member named 'status'; did you mean 'bsecStatus'?
       output = "BSEC warning code : " + String(iaqSensor.status);
                                                          ^~~~~~
                                                          bsecStatus
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:119:17: error: 'class Bsec' has no member named 'bme680Status'; did you mean 'bme68xStatus'?
   if (iaqSensor.bme680Status != BME680_OK) {
                 ^~~~~~~~~~~~
                 bme68xStatus
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:119:33: error: 'BME680_OK' was not declared in this scope
   if (iaqSensor.bme680Status != BME680_OK) {
                                 ^~~~~~~~~
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:119:33: note: suggested alternative: 'BME68X_OK'
   if (iaqSensor.bme680Status != BME680_OK) {
                                 ^~~~~~~~~
                                 BME68X_OK
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:120:19: error: 'class Bsec' has no member named 'bme680Status'; did you mean 'bme68xStatus'?
     if (iaqSensor.bme680Status < BME680_OK) {
                   ^~~~~~~~~~~~
                   bme68xStatus
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:121:58: error: 'class Bsec' has no member named 'bme680Status'; did you mean 'bme68xStatus'?
       output = "BME680 error code : " + String(iaqSensor.bme680Status);
                                                          ^~~~~~~~~~~~
                                                          bme68xStatus
/tmp/1410486018/Greenhouse_Humidity_and_Temperature_may14a/Greenhouse_Humidity_and_Temperature_may14a.ino:126:60: error: 'class Bsec' has no member named 'bme680Status'; did you mean 'bme68xStatus'?
       output = "BME680 warning code : " + String(iaqSensor.bme680Status);
                                                            ^~~~~~~~~~~~
                                                            bme68xStatus
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_3_0
Multiple libraries were found for "WiFiNINA.h"
  Used: /home/builder/opt/libraries/wifinina_1_8_14
  Not used: /home/builder/opt/libraries/betterwifinina_1_3_0
  Not used: /home/builder/opt/libraries/vega_wifinina_1_0_1
Multiple libraries were found for "ECCX08.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 "Adafruit_I2CDevice.h"
  Used: /home/builder/opt/libraries/adafruit_busio_1_16_0
  Not used: /home/builder/opt/libraries/vegaiot_busio_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 "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 "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
Error during build: exit status 1

Please help me...

Hi @lorenzo_castellan. I apologize for the problem importing the template.

The problem is that the template's sketch code was written for use with an older version of the "Arduino_MKRIoTCarrier" library. Unfortunately there was a change in the recent release of this library that made it incompatible with the template's sketch code.

The template developers are aware of the problem, but haven't updated the sketch code yet. So at this time an older version of the "Arduino_MKRIoTCarrier" library must be used with the template.

I'll provide instructions you can follow to configure Arduino Cloud to use the compatible version of the library:

  1. Click the following link to open the reference page for the "Arduino_MKRIoTCarrier" library in your web browser:
    https://www.arduino.cc/reference/en/libraries/arduino_mkriotcarrier/
  2. Click the "2.0.4" link under the "Releases" section of the page.
    A download of a ZIP file archive of that version of the library will start.
  3. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login
  4. Click the following link to open the Arduino Cloud home page:
    https://app.arduino.cc/
  5. Click the "CREATE NEW" button on the home page.
    A menu will open.
  6. Select "New sketch" from the menu.
    A new sketch will open in Arduino Cloud Editor.
  7. 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.
  8. 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.
  9. Click the upward pointing arrow icon at the top of the "Libraries" panel.
    The "Open" dialog will open.
  10. Select the "ZIP" file of the library you downloaded at step (2) of these instructions in the dialog.
  11. Click the "Open" button.
    The "Open" dialog will close.
  12. You will now see an indicator at the top of the "Libraries" panel in place of the upward pointing arrow icon as the library is imported. Wait for this indicator to disappear.

Now try importing the template once again. Hopefully this time it will work as expected.


Please let me know if you have any questions or problems while following those instructions.


In case you are curious to understand why this workaround solves the problem, I'll provide an explanation below. If you aren't interested in the boring details, feel free to skip reading the rest of the post:

By default, Arduino Cloud uses the latest available version of each library when compiling a sketch. As I mentioned above, the latest version (2.1.0) of the Arduino_MKRIoTCarrier is not compatible with the template's sketch code. So we must force Arduino Cloud to instead use the compatible previous version (2.0.4).

Arduino Cloud gives preference to any libraries you imported to your account over the pre-installed libraries. So by importing the compatible version 2.0.4 of the library to your account, it causes Arduino Cloud to use that version when compiling the template instead of the incompatible version 2.1.0 of the library as it did before you imported version 2.0.4 to your account.

1 Like

Hi, I also have the same problem but I haven't been able to solve it

downloadtool windows-drivers latest arduino keep

downloadtool bossac 1.7.0 arduino keep

downloadtool arduino-fwuploader latest arduino keep

downloadtool rp2040tools latest arduino keep

close COM3

{
  "Error": "We could not find the serial port COM3 that you were trying to close."
}

{
  "DownloadStatus": "Pending",
  "Msg": "The tool is already present on the system"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "The tool is already present on the system"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "The tool is already present on the system"
}

{
  "DownloadStatus": "Pending",
  "Msg": "The tool is already present on the system"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

downloadtool windows-drivers latest arduino keep

downloadtool bossac 1.7.0 arduino keep

downloadtool arduino-fwuploader latest arduino keep

downloadtool rp2040tools latest arduino keep

{
  "DownloadStatus": "Pending",
  "Msg": "The tool is already present on the system"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "The tool is already present on the system"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "The tool is already present on the system"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "The tool is already present on the system"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

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