Why the color stays on red(rgb led)

thank you that worked!!!!!!!!

Hi,
Look at my edited void rgbled ( ).
You still have not changed ALL the digitalWrite to analogWrite.

Also as @anon73444976 has pointed out, you have not changed the A0 back to pin 11.

int LRGB_RED=A0;

to;

int LRGB_RED=11;

Tom... :grinning: :coffee: :coffee: :coffee: :coffee: :australia:

i fixed all of them and it works fine .ty :grinning: :grinning:

Hello
Post your solution for my school assigment collection. :nerd_face:

Sadly, you have no idea why ‘it works’.

i guess digital write only can give 1/0(HIGH/LOW) but analog write can write between0/1023(0 volt/5 volt)

You guess wrong.
analogWrite can only cause HIGH or LOW to be written, but for variable lengths of time, very rapidly.
And unless you have a 10 bit timer, it will be in 1/256 steps.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.