LED widgets stopped working

I have a project that had run stably for a long time but suddenly the LCD widget began to disconnect from its virtual pin (mentioned elsewhere), and now the LEDs don’t light at all. I don’t see the LED issue mentioned elsewhere. Suggestions?

@mnw there seems to have been several widgets that have stopped working in recent days. Please provide details of your system and how you are connecting to Blynk.

I had a problem with led’s and found out the changed how the work( you can turn them on,off and dim them!) this might help you https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/LED/LED.ino

LEDs had old bug that was fixed. See docs on how it should work now.

Regarding LCD. You are using iOS, right? Could you post your code?

Thanks Dmitriy. I modified the LED code as you suggested and the LEDs are working again. I’m curious - what kind of applications do you envision for variable brightness of the LEDs?

By the way, I love your product, and thank you for your great support.

To answer your question - yes, I’m using iOS.

Regarding the LCD disconnect problem… I simply followed the code in your example sketch and it worked great up until this week. It still works fine when it’s connected - it’s just that it forgets the virtual pin assignment whenever blynk is restarted, and I have to go in each time and edit the widget to re-assign the pin.

The relevant lines of code are…

WidgetLCD lcd(2);

lcd.print(0, 0, sanibel.weather);
lcd.print(0, 1, precipString);

I don’t know. You tell me :wink:.

This one is fixed. Release is on Apple review.

One question about this change: I used to be able to declare:
Blynk.virtualWrite(V15, motorState);
To get an LED that read out the state of my motor (on/off)
I tried
WidgetLED motorLED(V15); motorLED.setValue(motorState);
but that doesn’t seem to work. Does Blynk not interpret HIGH == 255?


No. LED widget values are between 0 and 255. However you can use led.on() for HIGH value instead of led.setValue

Yeah, I ended up going with

    if (motorState == LOW){
    if (motorState == HIGH){

It's just a lot clunkier than a single line  `Blynk.virtualWrite(V15, motorState);` that I used to use. I'll live :)

Well, if that critical, you may go with little trick :

motorLED.setValue(255 * motorState);

Well, if that critical, you may go with little trick :

motorLED.setValue(255 * motorState);

You might say it’s “one weird trick to turn on your LED widget with one line of code” :laughing: