Hi,
Thanks for your support and help. For sure that these little issues will be solved with good will from all parties.
Links with the templates:
https://create.arduino.cc/iot/templates
Link with Smart Garden template:
https://create.arduino.cc/iot/templates/smart-garden
Error text when importing template:
/Smart_Garden_nov23a.ino:106:32: error: 'ST77XX_WHITE' was not declared in this scope carrier.display.setTextColor(ST77XX_WHITE); ^~~~~~~~~~~~ /tmp/200332876/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:106:32: note: suggested alternative: 'T_WRITE' carrier.display.setTextColor(ST77XX_WHITE); ^~~~~~~~~~~~ T_WRITE /tmp/200332876/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:107:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.setTextSize(3); ^~~~~~~ /tmp/200332876/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:109:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.setCursor(40, 50); ^~~~~~~ /tmp/200332876/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:110:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.print(waterPumpState); ^~~~~~~ /tmp/200332876/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:111:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.setCursor(40, 90); ^~~~~~~ /tmp/200332876/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:112:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.print(coolingFanState); ^~~~~~~ /tmp/200332876/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:113:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.setCursor(40, 130); ^~~~~~~ /tmp/200332876/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:114:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.print(lightState); ^~~~~~~ Error during build: exit status 1
Full tutorial Link for the same project;
https://opla.arduino.cc/opla/module/iot-starter-kit-maker/lesson/06-smart-garden?_gl=1*mpo9fc*_ga*MjAwMTE5NDUzNi4xNjM3NjYxODA1*_ga_NEXN8H46L5*MTYzNzY2NjYzNy4yLjEuMTYzNzY2NjY3Ny4w
Code Import link for this project
https://create.arduino.cc/iot/templates/smart-garden?_gl=1*139eo1x*_ga*MjAwMTE5NDUzNi4xNjM3NjYxODA1*_ga_NEXN8H46L5*MTYzNzY2NjYzNy4yLjEuMTYzNzY2Njk2OC4w
Error when import the code from that link:
/Smart_Garden_nov23a.ino:106:32: error: 'ST77XX_WHITE' was not declared in this scope carrier.display.setTextColor(ST77XX_WHITE); ^~~~~~~~~~~~ /tmp/020614087/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:106:32: note: suggested alternative: 'T_WRITE' carrier.display.setTextColor(ST77XX_WHITE); ^~~~~~~~~~~~ T_WRITE /tmp/020614087/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:107:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.setTextSize(3); ^~~~~~~ /tmp/020614087/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:109:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.setCursor(40, 50); ^~~~~~~ /tmp/020614087/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:110:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.print(waterPumpState); ^~~~~~~ /tmp/020614087/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:111:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.setCursor(40, 90); ^~~~~~~ /tmp/020614087/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:112:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.print(coolingFanState); ^~~~~~~ /tmp/020614087/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:113:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.setCursor(40, 130); ^~~~~~~ /tmp/020614087/Smart_Garden_nov23a/Smart_Garden_nov23a.ino:114:11: error: 'class MKRIoTCarrier' has no member named 'display' carrier.display.print(lightState); ^~~~~~~ Error during build: exit status 1
Step by step process to build this project link:
https://opla.arduino.cc/opla/module/iot-starter-kit-maker-long/lesson/smart-garden-long
I did follow all the entire process to create the thing, dashboard, variables, assigh board, connect it to the cloud and install the code and it fails every time.
This is the full code:
#include "thingProperties.h"
#include <Arduino_MKRIoTCarrier.h>
MKRIoTCarrier carrier;
int moistPin = A5;
String waterPumpState;
String coolingFanState;
String lightState;
uint32_t lightsOn = carrier.leds.Color(82, 118, 115);
uint32_t lightsOff = carrier.leds.Color(0, 0, 0);
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
delay(1500);
// 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_CASE = false;
carrier.begin();
carrier.display.setRotation(0);
delay(1500);
}
void loop() {
//Update the Cloud
ArduinoCloud.update();
//read temperature and humidity
temperature = carrier.Env.readTemperature();
humidity = carrier.Env.readHumidity();
//read raw moisture value
int raw_moisture = analogRead(moistPin);
//map raw moisture to a scale of 0 - 100
moisture = map(raw_moisture, 0, 1023, 100, 0);
//read ambient light
while (!carrier.Light.colorAvailable()) {
delay(5);
}
int none; //We dont need RGB colors
carrier.Light.readColor(none, none, none, light);
delay(100);
}
void onWaterpumpChange() {
if (waterpump == true) {
carrier.Relay2.open();
waterPumpState = "PUMP: ON";
} else {
carrier.Relay2.close();
waterPumpState = "PUMP: OFF";
}
updateScreen();
}
void onCoolingFanChange() {
if (cooling_fan == true) {
carrier.Relay1.open();
coolingFanState = "FAN: ON";
} else {
carrier.Relay1.close();
coolingFanState = "FAN: OFF";
}
updateScreen();
}
void onArtificialLightChange() {
if (artificial_light == true) {
carrier.leds.fill(lightsOn, 0, 5);
carrier.leds.show();
lightState = "LIGHTS: ON";
} else {
carrier.leds.fill(lightsOff, 0, 5);
carrier.leds.show();
lightState = "LIGHTS: OFF";
}
updateScreen();
}
//Update displayed Info
void updateScreen() {
carrier.display.fillScreen(ST77XX_BLACK);
carrier.display.setTextColor(ST77XX_WHITE);
carrier.display.setTextSize(3);
carrier.display.setCursor(40, 50);
carrier.display.print(waterPumpState);
carrier.display.setCursor(40, 90);
carrier.display.print(coolingFanState);
carrier.display.setCursor(40, 130);
carrier.display.print(lightState);
}
Errors when verifying:
In file included from /tmp/270604951/Smart_Garden_nov22a/Arduino_MKRIoTCarrier.cpp:21:0:
/mnt/create-efs/webide/73/65/7365eb3d33e519d58afd5a8474000a0d:paquo/libraries_v2/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier.h:120:5: error: 'Adafruit_ST7789' does not name a type; did you mean 'Adafruit_DotStar'?
Adafruit_ST7789 display = Adafruit_ST7789(&SPI, TFT_CS, TFT_DC, -1);
^~~~~~~~~~~~~~~
Adafruit_DotStar
/tmp/270604951/Smart_Garden_nov22a/Arduino_MKRIoTCarrier.cpp: In member function 'int MKRIoTCarrier::begin()':
/tmp/270604951/Smart_Garden_nov22a/Arduino_MKRIoTCarrier.cpp:32:3: error: 'display' was not declared in this scope
display.init(240, 240);//.begin(true); // Initialize ST7789 screen
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Arduino_MKRIoTCarrier.cpp:32:3: note: suggested alternative: 'delay'
display.init(240, 240);//.begin(true); // Initialize ST7789 screen
^~~~~~~
delay
/tmp/270604951/Smart_Garden_nov22a/Arduino_MKRIoTCarrier.cpp:37:22: error: 'ST77XX_BLACK' was not declared in this scope
display.fillScreen(ST77XX_BLACK);
^~~~~~~~~~~~
In file included from /tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:3:0:
/mnt/create-efs/webide/73/65/7365eb3d33e519d58afd5a8474000a0d:paquo/libraries_v2/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier.h:121:5: error: 'Adafruit_ST7789' does not name a type; did you mean 'Adafruit_DotStar'?
Adafruit_ST7789 display = Adafruit_ST7789(&SPI, TFT_CS, TFT_DC, -1);
^~~~~~~~~~~~~~~
Adafruit_DotStar
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino: In function 'void setup()':
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:39:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.setRotation(0);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino: In function 'void updateScreen()':
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:105:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.fillScreen(ST77XX_BLACK);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:105:30: error: 'ST77XX_BLACK' was not declared in this scope
carrier.display.fillScreen(ST77XX_BLACK);
^~~~~~~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:106:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.setTextColor(ST77XX_WHITE);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:106:32: error: 'ST77XX_WHITE' was not declared in this scope
carrier.display.setTextColor(ST77XX_WHITE);
^~~~~~~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:106:32: note: suggested alternative: 'T_WRITE'
carrier.display.setTextColor(ST77XX_WHITE);
^~~~~~~~~~~~
T_WRITE
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:107:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.setTextSize(3);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:109:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.setCursor(40, 50);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:110:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.print(waterPumpState);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:111:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.setCursor(40, 90);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:112:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.print(coolingFanState);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:113:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.setCursor(40, 130);
^~~~~~~
/tmp/270604951/Smart_Garden_nov22a/Smart_Garden_nov22a.ino:114:11: error: 'class MKRIoTCarrier' has no member named 'display'
carrier.display.print(lightState);
^~~~~~~
Error during build: exit status 1