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

Blinking widget LED by app (no by sketch)

#1

Hello, it would be useful to have a led widget that can also be set blinking not via hardware code, but via settings of widget/app, with a settable time in ms, for example blink if vpin HIGH, and off if vpin LOW.

This to be able to have a blink always regular (it happens that, due to different ping of the internet connection or because of a wifi far from the router, the blinking stops for a few ms and in any case we see that it is not regular) and for minimize the sketch code even more, with only HIGH or LOW state.

BR, Gabriele

1 Like

#2

I can’t recall if the image widget supports GIF files, if it does, you could display an animated GIF of a blinking light.

0 Likes

#3

Blynk is not a standalone App, it will not even load without a Server link… It is a system of App, Server and Hardware.

Your argument dictates that the LED be used to monitor connection and if good, blink regularly. Being based on timer code is perfect for that, since if there is a bad connection or no connection … the blinking slows or stops :stuck_out_tongue_winking_eye:

Besides, the App already has a system and shows the online status of the device… and if the server is the issue, well, the App stops :wink:

There is no benefit to reducing code as even a miniscule MCU can hold more than enough for such a simple task.

1 Like

#4

No, I solved the connection problem, and I don’t need to know if the connection is perfect or if it is “slowed down” from time to time, I have seen that it now works well, always. So, I no longer use the LED for the connection status, but I use LEDs to know if some sensors (magnetic switch on a door) are open or closed. In this case, the flashing of the LED over a display is more visible than a led always on.

  timer.setInterval(400L, blinkingLedAppIFopenDoor);

void blinkingLedAppIFopenDoor(){
    if (doorOpen == HIGH) { 
    if (led3.getValue()) {
    led3.off();
    } else {
    led3.on();
    }
    }
    if (doorOpen == LOW) {
    led3.off();
    }

I didn’t think the idea was so stupid. The problem, as mentioned before, is that the LED flashes not regularly based on many factors, while with a simple widget programmed via software from the app, it would have been regular (checking only if a value is HIGH or if it is LOW). That’s all

0 Likes

#5

You can already do that with Eventor.

0 Likes

#6

With eventor i can blink a widget indipendently from hw?

0 Likes

#7

Not blink in “idiot light mode” but Eventor can turn it ON or OFF based on your HIGH or LOW value. The developers have purposely prevented any cyclical action from being programmed into the Eventor… probably to keep from overloading the server.

The App doesn’t do much logic… as stated, it is not a standalone App, but rather the user interface for the whole IoT system of Blynk. Thus most logic is all handled by the server and your code. This probably keeps the App from being too bloated or consuming too many phone resources.

But if for some reason you don’t want HW connection, you can actually control the App widgets via the Server and API commands… again it is the Server that is doing most of the work though.

1 Like

#8

Maybe i do not having explained myself well. Anyway, Thanks a lot

0 Likes

#9

No, I think I fully understand… you want the App to have internal logic to control the flash rate of an LED based on a virtual pin or GPIO pin state.

But what you seem to not be taking into consideration is that if the HW goes offline then it cannot change the state of a virtual pin or pass on the state of a GPIO pin… thus that last known state stored in the server will NOT change… thus rendering your blinking “idiot light mode” vLED useless as an indicator.

The App already has a visual and even a notification alert of HW status, so adding in more cosmetic only “flashiness” is possibly just more bloat as there doesn’t seem to be any beneficial use-case to a self contained flashing LED in an App that isn’t really meant to run alone in the first place.

But who knows what the developers have in mind for Blynk 2.0… so all we can do is wait and see :slightly_smiling_face:

PS “idiot light” is NOT a derogatory term against your idea… it is a term for a status light that can only function in a limited way without any real data or forewarning of the issue.

I use UpTime counters and, yes, blinking vLEDs (via code) to monitor the connection status of some projects. If there are issues leading up to a possible disconnection, sometimes I can tell by the lag in the indicators.

1 Like