Hi All
I´ve been having some problem integrating my code with Blynk, by integrating I mean having my Arduino run as normal and reporting the sensor metrics to Blynk. I have created a VOID to read all sensors from my Arduino with no problem. But I can’t have the Arduino running its own functions while doing so, because if I insert the functions in the Loop the connection crashes, and if I insert them using Blynk Timer it also crashes connection.
I have read some info here to keep the loop clean, but where do I put my code and working functions??
I don’t need all these functions to be sent to Blynk, I just need them to be running in my Arduino.
Ps: I have commented the functions that crash the connection,
example1 with loop (connection crash):
void loop()
{
Blynk.run();
timer.run();
// MuestraSerial();
// sensorAmbiente();
// sensorLuz();
// macet(humedad1, bomba1, Macet[0], Flor);
// macet(humedad2, bomba2, Macet[1], Germina);
}
example2 with Blynk timer (connection crash):
void setuo(){
//(ather stup has been deleted from the post, for beter undestanding)
timer.setInterval(1000L, lecturaBlynk);
// timer.setInterval(1000L, macet(humedad1, bomba1, Macet[0], Flor));
// timer.setInterval(1000L, macet(humedad1, bomba1, Macet[0], Germina));"*
}
lecturaBlync = is my function where I have stored all readings and I’m able to visualize in the app
macet = is the function for local control of the variables connected to Arduino and all the logic behind it
Do I need to recode everything? or is there a workaround?
Systrem Specs:
Arduino UNO
ESP01 Shield
IDE 1.8.12