I have the Blynk application on IOS and I want to use the zergba widget. According to the documentation, you have to use a string datastream when you want to use the merge mode.
However, when I want to choose the datastream, I am only offered integers datastreams. I have looked in old posts and I saw that only the IOS version had this problem. I would like to know when this issue will be fixed. If not what are the other solutions to use the zergba wigdet with a led strip and the FastLED library.
In split mode, each of the parameters will be sent to a separate virtual pin instead of sending them all to the same virtual pin, so you can send the red color value to V1 for example, and use the BLYNK_WRITE() function to retrieve the value from the server. Something like this
BLYNK_WRITE(V1) // zeRGBa assigned to V1
// get a RED channel value
int Red = param.asInt();
Both modes are the same. The only difference between the two modes is the way they output data. Split mode outputs a single parameter, while merge mode outputs one message consisting of an array of values.
You can, but there are a few drawbacks.
It now requires 3 datastreams rather than 1, and this might be an issue if you are approaching the datastream limit for your plan.
Also, if you previously had one BLYNK_WRITE(vPin) function to handle all of the RGB commands you will now need three - one each for Red, Green and Blue.
You’ll probably need to have global rather than local variables for R, G & B and put your FastLED code in a function that is called whenever one of the three BLYNK_WRITE(vPin) functions for your ZeRGBa widget is triggered.
I would have expected this to be in a function called by each of your BLYNK_WRITE(vPin) functions, and you’ll probably need a BLYNK_CONNECTED() function with Blynk.syncVirtual(vPin) commands for each of your virtual pins.
int red = param.asInt();
int green = param.asInt();
int blue = param.asInt();
int RED = Blynk.syncVirtual(V1);
int GREEN = Blynk.syncVirtual(V2);
int BLUE = Blynk.syncVirtual(V3);
fill_solid(leds, NUM_LEDS, CRGB(RED, GREEN, BLUE));