RGB not showing correct color

Hello,

I am using zeRGBa to change the color of my RGB light. But the color is coming out wrong. For example, on the zeRGBa is 255,0,0 (Red) but it came out as 0,255,255 (Actual on my RGB light)?

I tried using a slider. example for Red (V0) min 0 max 255. If I selected on the zeRGBa is 255,0,0 (Red) but it still came out as 0,255,255 (Actual on my RGB light)? To get red on the RGB, I actually need to slide the red slider to 0, green slider to 255 and blue slider to 255.

Appreciate your help.

Thanks

Are you using Android or iOS?
Which app version?

Are you using your zeRGBa widget in simple or advanced mode?

What code are you using to receive the incoming data from the widget and control your RGB LED?

Pete.

Hello Pete,
Android.
Blynk version 1.14.3(168)
zeRGBa in simple mode (app on phone)

From ESP, e.g.

[Unformatted code removed by moderator]

From MCU, data received in string and then converted into integer

[Unformatted code removed by moderator]

I double check the value, 255,000,000 but not Red light on the RGB.

000,255,255 and it becomes Red light.

Same goes with 255,255,255 becomes off and not white;
000,000,000 becomes white and not off?

Thanks. Appreciate it.

@SL145585 Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

Hello Pete,
Android.
Mega with Wifi
Blynk version 1.14.3(168)
zeRGBa in simple mode (app on phone)

I double check the value, 255,000,000 but not Red light on the RGB.

if 000,255,255 and it becomes Red light.

Same goes with 255,255,255 becomes off and not white;
000,000,000 becomes white and not off?

The ‘error’ seems consistent with ‘reversing’ the 3 digits for each RGB.

From ESP, e.g.

BLYNK_WRITE(V0)
{
valueR = param.asInt(); // Save the values (brightness) generated by the ZeRGBa Widget for Red in the variable
}

From MCU, data received in string and then converted into integer

R = readString.substring(0, 3); // Place the first four characters from the string in Variable R

R.toCharArray(carray1, sizeof(carray1));
R1 = atoi(carray1)

analogWrite(red1Pin, R1);

I asked you to edit your existing post, not leave the Unformatted code in place and re-post it again with triple backticks. I’ve deleted the 7nformatted code from your previous post.

You seem to be doing some rather weird stuff, transferring data from an ESP to som other sort of board, presumably via serial data, which implies a poor choice of hardware. However, if your MCU is receiving data in the correct format then the issue lies with either your wiring of the RGB LEDs or the RGB LED itself.

I’ve encountered a similar issue with a 12v RGBW strip in the past…

I’d suggest you do some testing with a multimeter and maybe validate that the LED is producing the correct colours when the appropriate voltage is applied to the R, G and B pins.

Pete.

Hello Pete,
I am not sure what you meant or see from your end. Pretty new to these.

I serial print the RGB numbers. They matched what I selected on the Blynk app. Just the light didn’t come out correctly. I am using a duinotech 3 color RGB, pretty sure it’s ok. I will get a different type of RGB. If it’s still doing the same, I’ll just call it inverse RGB. No stress. Thanks.

And I’m not sure what this refers to.

I see only the information you post on the forum.

So clearly it’s not an issue or error with Blynk, but maybe a hardware or wiring error. Not really anything that the Blynk forum can assist with, especially with the limited information you’ve provided.

Pete.

All good. Thanks Pete. No issue with Blynk. I enjoy Blynk. :slightly_smiling_face:

I have a strip of RGB LEDs that are labelled wrong . . . The R is actually B, and the B is R . . . it might be as simple as bad labelling on a cheap strip.

billd

1 Like

Hi Bill,

The pin labelled RGB but tested it with a simple program and it was giving wrong color! Time to get some new ones ordered! Cheers.