On the mobile app, the devices show a “tile” (the top level interface that shows all devices). I would like to choose the LED color of a virtual pin.
Could someone explain to me the new concept of color in Blynk 2.0 in the context of tiles. The data streams required are a “color” which appears to require a string (it doesn’t appear to accept a hex code as a string - can someone give the specs?); a “button” (this appears to be an on/off button, I presume I can put in a dummy virtual pin if I don’t want to use it); and a “brightness” (is that 0-1 or 0-255 – can someone clarify?).
If this is all explained somewhere with an example, I would appreciate a link. I haven’t looked through the doc and the forum and haven’t seen it. A bit puzzling as I would think this is a common question, so apologies for taking bandwidth if this has been answered many times before.
What format have you used for the string?
Have you tried #ED9D00
Normally it depends on the min/max value for the datastream you are using.
If you define this as 0/1 then it will be on/off with no intermediate brightness levels.
If you define 0/255 then 255 will be max brightness, 128 half brightness etc.
If you went for 0/100000 then 50000 would be half brightness etc.
And, yes, I selected 1 as the default value for brightness, and that ping has a range from 0-1 - maybe that range needs to be larger. If this is supposed to work, I can do some more troubleshooting.
Blynk.virtualWrite does indeed set the value of the virtual PIN.
Blynk.setProperty(V1,“color”,"#abcdef") sets the color of the value when displayed
The “brightness” is a lever that shows how “full” the icon is. Presumably the idea is that one controls a dimmed light switch and it shows how bright it is. Poor choice of label.
I get to show color #fefaec when the “brightness” is anything higher than 0, and when the button is set to “0”. Except that nowhere do I specify this specific color. I’ve tried many variations, from hex codes to plain English colors, there’s no change in the color.
The documentation for the Color tile is still in the pipeline (we know, we know…)
The Color datastream expects an array of at least 3 values (red, green, blue) - similar to zeRGBa in advanced mode. RGB values are in 0-255 range. Then there are also optional white and animation modes (true/false) and additional multiple colors with same rgb pattern. But simple Blynk.virtualWrite(pin, red, green, blue) should work.
This tile was designed to work with RGB Light Control widget.