Control a LED with a Virtual pin from dotNet BlynkLibrary does not work

Let me explain the situation.
I am building domotics software in dotnet core an I managed to use the BlynkLibrary to recieve virtaul pins and I can sen -d then back also. For example I slect a Gauge or a button and I see the Gouge go to it’s max when V100 is 1 en to 0 when it is 0. Same for the Button 1 and I see chnage on the app to ON en 0 it chnages to OFF.
No I try the same with e LED but nothing happens. All I can select is the virtual pin number V100 en a color. But noting no color change at all. Even when I put them together I see the Gaughe and Button change but the LED does nothing.
Somebody any ideas on what the problem is ?

I search already in the community but did not find any answer.

Regards,
Peter

From your somewhat poor description it’s difficult to say what the problem is.

Is the LED widget illuminating at all? If not, then are you sending a value of 255 to turn it on at full brightness?

If the issue is that the LED is illuminating, but you aren’t managing to change the colour of the LED then are you using a setProperty command, and are you sending the correct format of hex data and the preceding “#” symbol as documented here…

Pete.

Thanks for the very quick response @PeteKnight. It was indeed a value problem, I figured it out now and I made it configruable so I can send instead of only 1 and 0 a preset minimum and maximum value. For the Led it would then be 0 or 255.

I find it a little strange that a LED has no min and max values you can define in the UI while others have it. It would also be more consitent and more intuitive to work with if it would be just configurable. But I understand a manjor upgrade is comming with even more features :slight_smile: .

Thanks for the help :slight_smile:

LED.on or LED.off works as well if you don’t want variable brightness.

I think you’re missing the point of the LED widget. It emulates a physical LED attached to an AVR device, which uses 8 bit PWM to give a range o 0-255
This allows virtually the same code to be used to adjust the brightness of a physical LED and a virtual LED.

The fact that more modern boards use higher bit values does undermine this approach somewhat, but changing the operation of a very old widget that works perfectly well probably isn’t a great idea.

The bottom line is that if you read the documentation then it’s very clear how it works.

Pete.