BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

led1.setColor(BLUE) fails when app closed

Hi!
I’m using time input to turn yard sprinklers on. (Auto mode) I also have a button in Blynk to turn them on. (Manuel mode)
To track whether they where turned on automatically or manually my code does:
Off- led1.setColor(RED)
Manually - led1.setColor(GREEN)
Automatically- led1.setColor(BLUE)
If I have the app open the led will always turn the correct color.
Anytime I have the app closed and system turns on automatically, the app will show LED color from when it was closed. Pausing and resuming Blynk app will always pull in correct led color.
Any suggestions how correct LED color without the need for pause-play?

What happens if you use Blynk.setProperty(vPin, "color", BLUE); (where vPin is the virtual pin that led1 is connected to)?

Pete.

I’ll keep trying that here, but I’ve been running the color change code like you suggested, over the last 30 min and haven’t managed to get it working. It’s got to be something here in my code, as color change is not worth much if you have to have the app open all the time for it to work.

What device are you using, and if it’s an ESP8266 based device then what version of the ESP core are you using?

Pete.

Hmmm. I’m not sure, I’m a beginner here. But I’m using Particles argon board. Their page says: Equipped with the Nordic nRF52840 and Espressif ESP32 processors.

What you’ve described sounds sufficiently similar to this:


to be worth investigating

and the reason I asked about your ESP core was because of this:


but as you’re using an ESP32 based board then it would be your ESP32 core you’d need to look at.

Pete.

Well… this is quickly getting beyond me here.
@PeteKnight what would you recommend I use for hardware here. Or whats your favorite? Need something that would just work with blynk…
The few requirements for my lawn irrigation system:
Able to easily connect to WiFi
Ability to update the firmware running on these boards remotely

Pete.