Lesson 4 - RGB LED

preview_player
Показать описание
Learn how to change an RBG LED colors with the Arduino. A beginner's guide to the Most Complete Starter Kit by Elegoo. Lesson 4 – RGB LED

Hello everyone, I'm Rick the Tech Enthusiast here with the next Elegoo Lesson. This is the next lesson on my Arduino UNO Series covering the Most Complete Starter Kit by Elegoo. I try to follow the included tutorial and will point out any changes or corrections as I find them.

As mentioned before, I purchased this Elegoo starter kit and Elegoo isn't sponsoring me. I just thought it would be fun to do a video of each Lesson as I was learning the Arduino environment.

Parts you’ll need:
* Arduino UNO R3 board
* RGB LED (the only LED in the kit with four leads)
* Three 220 ohm resistors
* Four male-to-male wire jumpers
* And the breadboard

I should also mention that Paul McWhorter has a great programming series for the Arduino UNO. You should check it out.

The next lesson will be Lesson 5 – Digital Inputs

Links:

Links:

(Note these are Amazon Associates links)
(Full Disclosure: I get a little credit/$ if you purchase a linked item.)

Affiliate Links that Help my channel:

Music provided by Free Music Archive, by artist Jahzzar

This is the fifth video on a new Arduino tutorial series. If you like the series, be sure to rate and subscribe.

Thanks for watching
Рекомендации по теме
Комментарии
Автор

Excellent for following the original tutorial and expanding on it. I will be using all of your videos to have the best experience with the kit!

f
Автор

Never mind! Ignore my last comment! After this headache, I did more research on resistors, I learned to count the rings, and then studied up on the arduino resistor chart. Turns out I had a 10k resistor on one of the series...the red legged one. That explains why the red light was so Dim! This whole process was a little frustrating but i learned so many fundamentals! Thats why i kept the last comment. Thanks for the tutorial. I got plenty of bonus material today lol

turntupgamer
Автор

Another great tutorial for beginners. Note: because your using the 220 resistors, you cant get the exact colors you want (for those of us who add our own extra bonus lessons). It took me over an hour to get colors like orange and yellow! I did it using the 330 resistors

turntupgamer
Автор

Excellent bonus material. Very informative and a nice method.

MiscRocketVideos
Автор

Thank you very much Ricardo. I don`t find the Lession 4 RGB LED before i see your Video. This Video was helpfull, thanks.
Greetings from Germany Ömer:)

omerk.
Автор

Bonus material was very helpful thanks!

austindabomb
Автор

My Uno r3 super starter kit arrives tomorrow, I'm a qualified electrician with a history of AC work in domestic settings, did the logixpro plc simulator, have been trying to get into plc, s for a while,
programming is new to me,

gimmieliberty
Автор

You might consider using the HSL color model. You'll need a C/C++ function to convert it to RGB values but this model lets you set a light value, a saturation value, and color hue. It's more natural. :)

PixelOutlaw
Автор

Thank you for this. When you started pointing out things that could be improved in the code, I paused the video and did some tidying up of my own copy. In my first iteration I had a display function taking red green and blue values as arguments. Then I realised that the colours (as represented by pin numbers) can be used as parameters - each of the loops in the original can be replaced by a call to a crossFade function which takes two pin numbers as parameters. I've saved the sketch as a gist at:


Thanks for the advice on logging via the serial output - I'll try that next.

justinforder
Автор

What if we replace the first 3 if statements with a switch statement, Just like this
do
{
setColor(redValue, greenValue, blueValue);
switch(ledGear)
{
case 1:
redValue--;
greenValue++;
break;
case 2:
greenValue--;
blueValue++;
break;
case 3:
blueValue--;
redValue++;
}
if(greenValue == maxBright)ledGear=2;
if(blueValue == maxBright)ledGear=3;
if(redValue == maxBright+1)ledGear=4;
delay(delayTime);
}while(ledGear<4);

almightyHammer
Автор

The Serial Monitor was very help I never knew about that feature. 17:09
Was is the effect of adding more LEDS in series. Do you know I can better use excell or libreOffice Calc spreadsheets? For that. Theres a decimal() command to convert I think raddix was misused to mean BASE.

ramaclub
Автор

I spent a half hour trying to get the four little leads from the LED into the breadboard and realized I probably don't have the dexterity for electronics.

cutterxbuck
Автор

Hey me again I want to suggest MPR121 touch controller buy at least two since sometimes the dont work or maybe theres a bit needs 2nd on to work? Thanks for your videos.

ramaclub
Автор

Great video. My daughter got this for Xmas and one thing we are noticing with Lesson 4 that when we upload we get a “problem uploading to board” message. Any idea what this could mean? Thanks!

frankdemariany
Автор

i think i deleted the pdf with the code where can i download the code? i had to get it on github but dont want to go there always

jesussaquin
Автор

What if i use 4 RGB leds in place of 1led is the code is same or changed?

prashantpatel
Автор

Arduino: 1.8.7 (Windows 10), Board: "Arduino/Genuino Uno"
Sketch uses 1432 bytes (4%) of program storage space. Maximum is 32256 bytes.
Global variables use 15 bytes (0%) of dynamic memory, leaving 2033 bytes for local variables. Maximum is 2048 bytes.
Please select a Port before Upload

I got this error, I am unsure as to what it means by selecting a port, I already have it connected to my Computer

sirdioth
Автор

Hello sir, hopefully you’ll see this, as I have a question! I cannot seem to locate this magical “code folder” that everyone speaks of. It may be because my laptop doesn’t have a CD player so perhaps the CD is where it is located. But either way, they said everything is downloadable on their website, but the only thing I got was the Arduino program itself. Please help as I am very lost!

Adixon