Arduino Tutorial: How to use an RGB LED with Arduino.

แชร์
ฝัง

ความคิดเห็น • 109

  • @Educ8s
    @Educ8s  2 ปีที่แล้ว +2

    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 TH-cam CHANNEL!
    bit.ly/3tku2n0

  • @yp4577
    @yp4577 5 ปีที่แล้ว +19

    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

    • @SUSMITRUDRA
      @SUSMITRUDRA 4 ปีที่แล้ว +1

      th-cam.com/video/-tNlOuZkbBg/w-d-xo.html
      Just go and watch it....you will fall in love with Arduino

  • @storken756
    @storken756 4 ปีที่แล้ว +2

    Hey, why dont you use one 330 uhm resistor on the ground wire insted of 3 on the positive side?

    • @cookiesaregreat
      @cookiesaregreat 3 ปีที่แล้ว

      I was wondering the same thing. But I'm new to electronics so maybe I'm missing something.

  • @nigelv1494
    @nigelv1494 7 ปีที่แล้ว +3

    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.

  • @R1DX607
    @R1DX607 ปีที่แล้ว

    is the resistor is so much important?

  • @krishnav6226
    @krishnav6226 4 ปีที่แล้ว +1

    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.

  • @j.lietka9406
    @j.lietka9406 5 ปีที่แล้ว +5

    hello, great helpful video! can the random value generator be used to
    create random brightness? thank you

    • @Educ8s
      @Educ8s  5 ปีที่แล้ว +4

      Sure, why not

  • @gravecop
    @gravecop 5 ปีที่แล้ว +6

    Thank you. Exactly what I looked for. Subscribed also.

  • @isharalkshan7
    @isharalkshan7 2 ปีที่แล้ว

    can we use only one 330 ohm resister with GND pin..?

  • @blazemaster9626
    @blazemaster9626 4 ปีที่แล้ว +1

    Thank You So Much For This Video! You deserved a subscriber!

    • @blazemaster9626
      @blazemaster9626 3 ปีที่แล้ว

      @Cullen Javier Is it on android?

  • @VivekGupta-bt7tn
    @VivekGupta-bt7tn 10 หลายเดือนก่อน

    how can we make the orange colour? it's made up of red and yellow, in which yellow itself is a mix color. i tried it but it didn't work

  • @lovesrilanka6806
    @lovesrilanka6806 2 ปีที่แล้ว +1

    Well explained in detail.many thanks to you!
    ✌✌✌

  • @Nikpar005
    @Nikpar005 5 ปีที่แล้ว +2

    Τρόμαξα για λίγο,και μετά καταλαβα,ΕΛΛΗΝΑΣ.
    Τέλειο το βίντεο με βοηθείσες πολύ.

  • @alexabadi7458
    @alexabadi7458 3 ปีที่แล้ว

    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 !

  • @SymphonyKol_androidLover
    @SymphonyKol_androidLover 2 ปีที่แล้ว

    Much needed tutorial, thanks a ton dude.

  • @angus2984
    @angus2984 6 ปีที่แล้ว +1

    Hi! How do I use the keyboard to control the LED? Example Press R to light red. Press G to light green. Press Y to light yellow.

  • @rallekralle11
    @rallekralle11 8 ปีที่แล้ว +4

    didn't you upload this video yesterday?

  • @peksn
    @peksn 7 ปีที่แล้ว +2

    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?

    • @PeterPan-pr9od
      @PeterPan-pr9od 6 ปีที่แล้ว +2

      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);
      }

  • @saayanchowdhury
    @saayanchowdhury 3 ปีที่แล้ว

    My RGBs lights pins are of same size what should I do

  • @wahyupans8868
    @wahyupans8868 4 ปีที่แล้ว

    How to make color code efficiently on void loop function?

  • @mitchellvolcano
    @mitchellvolcano 4 หลายเดือนก่อน +1

    What RGB led are you using

  • @sunildawar2632
    @sunildawar2632 3 ปีที่แล้ว

    can I use 100 k resistor ?

  • @francoisperreault8114
    @francoisperreault8114 6 ปีที่แล้ว

    C' est mon premier montage que je réussi à faire tout seul et qui fonctionne ...un gros Merci.

  • @ArKa_47
    @ArKa_47 5 ปีที่แล้ว +2

    what is a distel-PIN?

    • @ime108.
      @ime108. 5 ปีที่แล้ว

      Lol don't make joke of anyone...
      Get out of here u fool

  • @ananthaiyer9008
    @ananthaiyer9008 2 ปีที่แล้ว

    Thanks for the crisp tutorial

  • @ryguyguillory2950
    @ryguyguillory2950 6 ปีที่แล้ว

    Are u able to do this with lots of rgb leds

  • @dangdaniel781
    @dangdaniel781 ปีที่แล้ว

    My blue and green colors are almost indistinguishable. I’m very confused, I followed all the code you did, and I even tried a different LED

  • @Mr_Moe_Lesterr
    @Mr_Moe_Lesterr 5 ปีที่แล้ว

    is this gonna work with 10mm RGB?

  • @nursanjida4321
    @nursanjida4321 5 ปีที่แล้ว

    do i need a power supply such as batteries? & how do i turn it on or off?

  • @JeremyGarrettArtist
    @JeremyGarrettArtist 5 ปีที่แล้ว

    Can the same control be accomplished with a two pin rainbow LED and if so how?

  • @petarmedo1192
    @petarmedo1192 6 ปีที่แล้ว

    the problem i have is that i have to connect the ground pin to source and connect the gnd to the other electrodes of the led to get the wanted colors

  • @amantin
    @amantin 5 ปีที่แล้ว +1

    Πολύ ωραιο το βίντεο.
    Thanks aderfe!

  • @Magi446
    @Magi446 2 ปีที่แล้ว

    Hello, can someone explain why my red led become purple led ?
    I use anode rgb led

    • @jeremyo1457
      @jeremyo1457 2 ปีที่แล้ว

      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

  • @DeepakSingh-gl7vr
    @DeepakSingh-gl7vr 4 ปีที่แล้ว

    Can i use 470 ohm resistor instead of 330 ohm ?

    • @luiisxz6886
      @luiisxz6886 4 ปีที่แล้ว

      yes, you can use 330 ohm or higher, but not lower

  • @cookiesaregreat
    @cookiesaregreat 3 ปีที่แล้ว

    I don't understand Why can't you just put one resistor on the ground pin? I'm relatively new to electronics.

  • @braylenhammond12
    @braylenhammond12 2 ปีที่แล้ว +1

    Did you know that the minimum is actually 220 Ohms, i tested it on tinkercad as i don't have a real arduino yet

  • @nursanjida4321
    @nursanjida4321 5 ปีที่แล้ว

    may i know what type of wire did you use? is it male to female, male to male, or female to female?

  • @peksn
    @peksn 7 ปีที่แล้ว

    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.

  • @julianguerra6974
    @julianguerra6974 5 ปีที่แล้ว

    Thank you!! I really needed this lol

  • @nachovidal4047
    @nachovidal4047 7 ปีที่แล้ว

    It's possible to connect the rgb led to a 4 pin female connector?

    • @Educ8s
      @Educ8s  6 ปีที่แล้ว

      Sure you can!

  • @markhofland1898
    @markhofland1898 4 ปีที่แล้ว +1

    Nice video, I just subscribed.

  • @aniketgupta1340
    @aniketgupta1340 7 ปีที่แล้ว

    does rgb works with regular battery too?

  • @vallemalle6131
    @vallemalle6131 4 ปีที่แล้ว +1

    Very good video,
    Thank you.

  • @thomasalexander1563
    @thomasalexander1563 7 ปีที่แล้ว +7

    Interesting,,,
    Let's make more subscriber for this arduino channel

  • @randomtech3749
    @randomtech3749 5 ปีที่แล้ว

    Is a 220 ohm resistor fine?

    • @clemg6254
      @clemg6254 5 ปีที่แล้ว

      Random tech yes

  • @philowen2755
    @philowen2755 8 ปีที่แล้ว +1

    Thanks Nik. (How did you know I've just bought 20 of them? ;-)

  • @klopscyyy2771
    @klopscyyy2771 4 ปีที่แล้ว

    Why aren't all the resistors positioned in the same direction?

    • @Educ8s
      @Educ8s  4 ปีที่แล้ว

      The direction does not matter

  • @anuragnayak324
    @anuragnayak324 10 หลายเดือนก่อน

    Instead of using 3 resistors, we can use a single resistor in the common pin...

  • @mitchh6471
    @mitchh6471 7 ปีที่แล้ว

    sorry im new!! it keeps highlighting the void setup!! not sure what to do!! because it looks correct to me

    • @fehelii
      @fehelii 7 ปีที่แล้ว

      Mine loaded both RGBexamble1 and RGBexamble2. had to put the files in separate folders, now it works..

    • @mitchh6471
      @mitchh6471 7 ปีที่แล้ว

      ill give that a try

  • @JorgeRamirez-kv4jx
    @JorgeRamirez-kv4jx 6 ปีที่แล้ว

    Do you have to use arduino

  • @DevJeb
    @DevJeb ปีที่แล้ว

    Why is yours reversed?? Why do you connect the longer pin in ground??

  • @raze7x
    @raze7x 8 ปีที่แล้ว +3

    very well done, thx!

    • @Educ8s
      @Educ8s  6 ปีที่แล้ว

      You are welcome!

  • @aydenneal6751
    @aydenneal6751 2 ปีที่แล้ว

    Thank you very much

  • @salc9593
    @salc9593 6 ปีที่แล้ว

    Hi, I enjoyed your video. I know am aware you video is 2 years old but if you are still online I would like to ask a question of you.

  • @SaptarshiSikder
    @SaptarshiSikder 4 ปีที่แล้ว

    error compile the code

  • @shrikarchoudhari537
    @shrikarchoudhari537 6 ปีที่แล้ว +1

    Code is not working

  • @gowsamig5017
    @gowsamig5017 8 ปีที่แล้ว

    really useful...thanks for share

  • @TheBenZyy
    @TheBenZyy 6 ปีที่แล้ว

    How to get the code?

  • @videshx818
    @videshx818 3 ปีที่แล้ว

    330 ohms resistor is not working

  • @annadenaro9919
    @annadenaro9919 5 ปีที่แล้ว

    I can download this code, but not open it as usually. why can't you just type it out.

  • @ravikantkumatray3403
    @ravikantkumatray3403 6 ปีที่แล้ว

    Isme ek 2 pin 3 coulor aata hai uska name, number kya hai

  • @shuvendupattari8079
    @shuvendupattari8079 7 ปีที่แล้ว

    please send me a best led pattern code

  • @ZaidWindow
    @ZaidWindow 3 ปีที่แล้ว

    Mine is not working

  • @alexbeum7403
    @alexbeum7403 4 ปีที่แล้ว

    code not linked correctly

    • @Educ8s
      @Educ8s  4 ปีที่แล้ว

      I just tried the link, it works fine.

  • @Anon.G
    @Anon.G 8 ปีที่แล้ว

    Why is there no ground?

    • @nightwhisper8520
      @nightwhisper8520 8 ปีที่แล้ว +2

      Actually there is
      It's connected on the GND of the analog part

  • @emirkaplan7384
    @emirkaplan7384 6 ปีที่แล้ว

    my led only lights green why ??

    • @luiisxz6886
      @luiisxz6886 4 ปีที่แล้ว

      my led lights red and blue but not green lmao

  • @miekamariehodson1731
    @miekamariehodson1731 6 ปีที่แล้ว

    my led only lights blue and i have no idea why

    • @Educ8s
      @Educ8s  6 ปีที่แล้ว

      Have you tried another LED to see if the happens to that as well?

  • @roopavernekar3109
    @roopavernekar3109 4 ปีที่แล้ว

    Ty sm

  • @Mr30friends
    @Mr30friends 8 ปีที่แล้ว

    Πολύ ωραιο το βίντεο.

    • @Educ8s
      @Educ8s  8 ปีที่แล้ว +1

      Ευχαριστώ πολύ!

  • @conquerorzzz
    @conquerorzzz 5 ปีที่แล้ว

    Thnx bro

  • @ghumamandal9591
    @ghumamandal9591 4 ปีที่แล้ว

    arduino uno dj lighte rgb

  • @hasansami5181
    @hasansami5181 4 ปีที่แล้ว

    easy peasy

  • @deanpavicic3271
    @deanpavicic3271 2 ปีที่แล้ว

    Hi, are you willing to do some project for me, of course I am willing to pay your knowledge, please let me know if you are interested,

  • @maanalabed445
    @maanalabed445 4 ปีที่แล้ว

    من فضلك ضع الترجمة

  • @nick24646
    @nick24646 7 ปีที่แล้ว

    My Arduino set fire;be careful if trying :(

  • @Gauravvanis
    @Gauravvanis 6 ปีที่แล้ว

    Sir,
    I am your little follower from india...
    I watch your video's from last two years..
    And from inspiration i started my own TH-cam channel...and need your support to grow...plzz help me sir..🙏

  • @wedostudent2882
    @wedostudent2882 5 ปีที่แล้ว

    hi

  • @manyhammers5944
    @manyhammers5944 6 ปีที่แล้ว

    Damn! Z-Hut sucks! He copied this!

    • @Educ8s
      @Educ8s  6 ปีที่แล้ว +1

      What do you mean? Who copied it?

    • @manyhammers5944
      @manyhammers5944 6 ปีที่แล้ว

      educ8s.tv The Z-Hut
      He has no original content.