Hello!
I bought OplaIoTKit a few days ago. I finished the "Get to know The Carrier" lesson. Now I am doing the "Get to know the cloud" lesson and I got stuck.
The problem is writing the code in the sketch after creating the dashboard.
First, the void setup() function of the code written in the lesson https://opla.arduino.cc/opla/module/cloud/lesson/get-to-know-the-cloud, is not the same. My project generates the following function:
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();
}
I assume even though the code differs from the one from the lesson, it is correct, so I did not change anything.
Second, when I add all the missing code, as written in the lesson, I get the following error:
libraries/arduino_mkriotcarrier_0_9_8/Arduino_MKRIoTCarrier.cpp.o:(.bss.CARRIER_CASE+0x0): multiple definition of `CARRIER_CASE' sketch/Untitled_feb06a.ino.cpp.o:(.bss.CARRIER_CASE+0x0): first defined here collect2: error: ld returned 1 exit status exit status 1
If I delete the line "bool CARRIER_CASE = false;" from the top of the code, there is no more errors, but when I check the Serial Monitor tab, it does not say that my Arduino is connected to the cloud or Wi-Fi network.
I tried to copy the whole code from the lesson into my sketch, but the result is the same.
Any ideas?