I’m writing because I have a problem with Arduino OPTA and Blynk. If I insert the BlynkSimpleWifi.h library and the Blynk.config in my sketch everything is fine; as soon as I try to insert Blynk.run and compile the sketch I get this error which reports: "C:\Users\Facility\AppData\Local\Temp\arduino\sketches\BE48FF858D50271795B7F35445286FB0/…..\cores\arduino_mbed_opta_opta_split_100_0,target_core_cm7, security_none_41bcd6cecbbb7a037f4552f498a6888f\core.a(wiring_analog.cpp.o): In function analogWrite': C:\Users\Facility\AppData\Local\Arduino15\packages\arduino\hardware\mbed_opta\4.0.10\cores\arduino/wiring_analog.cpp:74: undefined reference to g_AAnalogOutPinDescription’
collect2.exe: error: ld returned 1 exit status
exit status 1
Compilation error: exit status 1
I attach skecht
#include "secret.h"
#include <WiFi.h> ///per WIFI
#include <BlynkSimpleWifi.h> ///per blynk
void setup() {
Blynk.config(BLYNK_AUTH_TOKEN);
BlynkTimer timer;
if (WiFi.status() != WL_CONNECTED) {
Serial.println("Connessione WiFi persa. Tentativo di ristabilire la connessione...");
WiFi.begin(ssid, pass);
Serial.println("Connessione alla rete WiFi in corso...");
}
else{
Serial.println();
Serial.println("- NETWORK INFORMATION");
Serial.print("- Connesso alla rete ");
// Display network IP
IPAddress ip = WiFi.localIP();
Serial.print("- IP address: ");
Serial.println(ip);
// Display network RSSI
long rssi = WiFi.RSSI();
Serial.print("- Signal strength (RSSI): ");
Serial.println(rssi);
}
}
void loop() {
if (WiFi.status() == WL_CONNECTED) {
Blynk.run();
timer.run();
}
}
I hope that someone can solve this problem. In this moment I’m using Arduino iot Cloud. I have done montlhy subscription. I wouldn’t transfer all application on Arduino Cloud. I can’t have two difference applications. How did you solve your issue? Thanks for sharing.
i had the same problem with an Arduino OPTA. I looked inside the file “wiring_analog.cpp”, in the given path, from the error message and searched
for the undefined reference “g_AAnalogOutPinDescription”.
The Variable is declared in “Arduino.h” file and there is a comment which navigates me to OPTA/variant.cpp. I am not a C++ programmer so i don’t
understand every line of this code but in the variant.cpp is no Pins-Table for g_AAnalogOutPinDescription only a g_AAnalogPinDescription without the word “Out”.
So i decided to comment out the declaration and the reference to this Variable as shown below. After that my code is compiled sucessfully and works.
Are you guy using Arduino IDE or Visual Code platfomr IO? I rather use Platform IO for opta as it much faster , but last time i tryied to use arduinoIoT on platfomr Io a lot of errors came and just abandon it for blyik wich didnt have any error when compiling with visual code.