I hope you took away lots from this video and you managed to get your RGB LED to work. Let me know below! PS. WANT TO LEARN CODING? CHECK MY NEW RU-vid CHANNEL! bit.ly/3tku2n0
Thank you so much for this. I recently "discovered" Arduino and would like to play around with it some more, and your clear explanation about everything in this project helps a lot. I almost instantly liked and subscribed
Thanks man the tutorial code was wrong it says to connect long pin to 5v then I couldn't find red colour. After I ground long pin I got all colours bro thanks.
Hi, What sketch would you use for controlling two different 2 rgb leds? I'm trying to write it so that the first led changes between red and blue and the second led changes between yellow and green. The problem I'm getting is that both leds are changing between red and blue.
Cut a clear 5mm diameter straw to about one inch long, put the piece of straw on the 5mm RGB LED, it should fit perfectly, now fill up the piece of straw with hot glue using a glue-gun, let it cool a little bit, and now you have a very nice color stick that will diffuse the LED light !
Hey! so if i got a common anode can I still control the brightness of the coloured leds?, because as far as I know I have to phisically connect the coloured leds to ground for them to light up, can I do some ground control inside the code?
yes, if you use; pinMode(x, INPUT_PULLUP); The rgb values are then inverted, so the colour red will now be (0, 255, 255) rather than (255, 0, 0). heres the code: int redPin = 9; int greenPin = 10; int bluePin = 11; void setup() { // put your setup code here, to run once: pinMode(greenPin, INPUT_PULLUP); pinMode(bluePin, INPUT_PULLUP); pinMode(redPin, INPUT_PULLUP); } void loop() { // put your main code here, to run repeatedly: setColor(0, 255, 255); //Red delay(1000); setColor(255, 0, 255); //Green delay(1000); setColor(255, 255, 0); //Blue delay(1000); } void setColor(int red, int green, int blue) { analogWrite(redPin, red); analogWrite(greenPin, green); analogWrite(bluePin, blue); }
Hey! So i fixed he thing before, now what's going on is that I don't know which the highest value of the AnalogFunction is, I have to use up to a 500 in some of the values to get a true purple as setting it for example even to 350 it'll still look white.
Yeah i found out the hard way i have a common anode led and he I believe has a common cathode led. So you have to put 5 volts on the common led (not connect it to ground) and then all the other leads need to be connected to the outputs
Sir, I am your little follower from india... I watch your video's from last two years.. And from inspiration i started my own RU-vid channel...and need your support to grow...plzz help me sir..🙏