In merge mode, the zeRGBa widget writes a single message to the virtual pin, which consists of an array of values. As an example, if you have a zeRGBa widget connected to the virtual pin V1, you can parse each value for RGB on your Raspberry Pi as:
BLYNK_WRITE(V1) // zeRGBa assigned to V1{// get a RED channel valueint r = param[0].asInt();// get a GREEN channel valueint g = param[1].asInt();// get a BLUE channel valueint b = param[2].asInt();}
The following steps explain how to add a zeRGBa widget to the canvas and configure it for use with virtual pins:
- In edit mode, tap the plus icon to open the Widget Box.
- Under Controllers, tap zeRGBa. A zeRGBa widget will be added to the canvas:
- Tap the zeRGBa widget ...