I used a potentiameter and 2 pullup resistors with RGB LED and switch between main colors by tapping a key, adjusting the strength of each color by turning the nub, and clicking another button to set the color. It's amazing!!!
Because of your lessons I was able to connect 3 potentiometers with 1 RGB LED and code everything on my own. Each potentiometer had its own task (red, green, blue) and I was able to convert the 0 - 1023 to 0 - 255 and send the signals to the RGB LED to create any color I wanted. Thank you for having this channel available to us!
Hey Paul, just want to say I've been trying to learn Arduino while quarantined due to COVID-19 and have been learning so much from these tutorials. Thanks for making the learning process so fun, can't wait to learn more from this series!
I want to thank you for these videos! I am at 21 now and did a sideproject where I used three pot meters to adjust the levels of the led. All with stuff I learned from you!! Thanks again!!
This was my solution to the exercise at the end of lesson 20. I was using a common Anode RGB LED, so using analog,Write a value of 0 switched the colour on, and 255 switched it off, with corresponding values inbetween to mix the colours. Also inserted 3 potentiometers into the circuit which enabled me to mix the colour by turning the pot. Great lectures as always. Really helping me to learn and use my kit.
I would also to thankyou for all you do , i'm a little late to the Arduino party being medically retired after some 40 ish years being a mechanic i was going stir crazy with nothing to do being physically challenged ;, now am learning again and you make it so interesting (thankyou for spelling colour the English way as that is were i'm from )👍
Hello Mr. McWhorter. Thankyou for your wonderful lessons. We have learned a lot from this one too. Our LED light was brilliant! We made so many diffirent colors with it, and we can't wait to learn how to make black. Thank you very much! 😄
The Elegoo kit is the best thing I ever purchased! Even though this stuff has so many potential real-world applications for work, this is very fun to play around with!
Paul, your videos are a life saver! I've enjoyed every one so far and i genuinely feel like I'm retaining the information, and I'm able to apply the knowledge on projects outside of what you cover in the videos. I plan on watching every one of your videos in this series, thank you so much for all the time you've committed to this!
Great, i added a config section so that you can use 3 potenciometers to configure new colors, it shows the R G B value in the serial monitor so its easier to make more colors. And all thanks to all these videos. you are awsome.
Hi Paul, Really enjoying these. I am a pastor who started as a ChemE. I wrote a program to input the 3 color values and then analog print the three values to the RGB pins so you could easily input whatever color you want from the chart. Your lessons are very helpful. I programmed in FORTRAN years ago. Very nice refresher course with the Arduino.
Being the exploring type, I came up with an interesting variation. Using for loops and and an if statement, I wrote a sketch that continuously cycles the RGB LED through al the colors from red to yellow to green to cyan to blue to magenta to red, and all colors in between. Of course I used a delay to control the speed. Pretty cool!
Having a lot of fun with this class. Even though I have the Elegoo Super Starter Kit, I also have a DrDuino Explorer board that I assembled and am trying to learn how to use. If you are not familiar, the Explorer has a lot of components and devices installed as a very flexible bread board. I can talk directly to many of the devices on board, or switch them out and use the GPIO pins to talk to a conventional Breadboard. Today I used it to play with the RGB LED. Instead of entering numbers via the Serial comms, I used the three on-board Pots. Read them via analog pins, converted to PWM values, and sent the numbers to the LED. Therefore I can adjust the three pots to create any color I want. So much fun! Thanks for this great class!
Yeah, I love these videos man, thank you. Now I am even listening to them in the car on the way to work and back for the 'first time through'. When I get home I am excited to try a project or two that you covered.
Another great tutorial. I have now also started to follow the Fusion 360 tutorials, which are explained better by you from the basics. Others immediately start with 3D drawings and the learning curve is, at least for me, too steep.
Creating colours, using electronics and software, was not something had ever expected to happen. I imagine an 84 year old purchasing table tennis balls generated some strange looks. Because your lessons are so clear and you reinforce information (not just resistors but current limiting resistors) I have been able to play with this program and fun does not begin to describe it.
Dear Paul, I want to thank you for teaching me Arduino. I dont think I would have gotten into Arduino without you. I love your effort and how you make these videos fun. Keep it up! :D
Hats off Paul on yet another cool project. I got this far in following the tutorials and at this point I decided to improve a little bit. Namely, I decided to put this little RGB "lamp" on a continuous loop to increase/decrease gradually all the colors, each LED going from 0 to 255. So I decided to write 2 loops using the "for" command and I told Arduino to start from zero on each LED and gradually increase the voltage to max 255 by using the ++ command. This way I was trying to get through all the possible combinations of RGB gradually. The second loop was the opposite. I used the "for" command to start from 255 and decrease the voltage by - - . Unfortunately I discovered that I still have to practice a bit more since something went south somewhere in these loops. I won't stop though. I will stick around until I learn some more. Blessings from British Columbia, Canada.
Hi Paul, I got all this to work and really enjoyed the process. I even tried to get the colour or color BLACK. Then I Google it and found that Black or black is actually an ultra violet light: that was very interesting. I think I'll look more into this phenomenon in the near future. Thanks again for a very informative and interesting lesson.
So I just combined what I lerned from this tutorial with what I lerned from tutorial 14 and made the same thing but where I used potentiometers to adjust the colourscale. Never could have done it without you help! Thank you!
Bought back memories of setting up old CRT tellies, our trick was, to make it a perfect black and white, when that was correct, we could add in chrominance, that being the colour signal.
Wow 16 million colors, that's crazy. Maybe someday I'll make a matrix of rgb leds and multiplex and control it with a pi for background ambience. Thank you Mr. Mcwhorter, great lesson.
That was a great assignment. Great way to practice the code and play with the agalogWrite numbers. I messed around for a couple hours trying to get all the colors just right before I moved one to this video. Compared my numbers to yours and I was pretty close. Learned a lot on that assignment. Thanks.
I think, for flexibility... best to utilize pins that can be used for both digitalWrite(); and analogWrite(); Pins like ~11 (redPin), ~10 (greenPin), ~9 (bluePin) Thank you Sir Paul for this great lesson!
i did this as the homework from lesson 20. it was nice being able to sit back and relax through this brief lesson. sorry about the coffee. i always come equipped with basically the same mug as yours, only hot since its only 20F here.
Your lessons have really helped me. I have a passion for electronics and watch many videos on youtube but yours really make it simple and fun. keep up the good work.
I was biting my nails the whole video waiting for the moment you tried to change the values on the red pin since it's not connected to an analog pin... And it never happened xD But hey, I know pin 8 is not an analog pin thanks to you. Very good tutorials. I'm learning a lot. Keep the good work and thank you.
Using a loop to set integer values for each colour of the RGB LED. here's the code! it uses a loop to ask a question and then uses a function to input the values: int redpin=9; int greenpin=10; int bluepin=11; String setmsg="Would you like to set a colour for RGB LED?"; String redmsg="What value do you want for colour red?"; String greenmsg="What value do you want for colour green?"; String bluemsg="What value do you want for colour blue?"; String answer; int redval; int greenval; int blueval; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(redpin,OUTPUT); pinMode(greenpin,OUTPUT); pinMode(bluepin,OUTPUT); }
void loop() { // put your main code here, to run repeatedly: Serial.println(setmsg); while (Serial.available()==0){ } answer=Serial.readString(); if(answer=="yes"){ RGB(); } } void RGB(){ Serial.println(redmsg); while (Serial.available()==0){ } redval=Serial.parseInt(); analogWrite(redpin,redval);
Well, knowing nothing about Electronics or Arduino I came across one of Paul's RUclips videos. I'm hooked, got the kit and I'm working through the videos. They are amasing (note UK spelling :-) ). Thanks Paul.
Hi Paul, Greetings from Scotland. excellent lesson again. Thanks for the UK spelling of colour, much appreciated. To help me with the values for the colours I downloaded a decimal colour chart from Pinterest. This gives me a good idea of the colour and the value for the RGB and only minor tweaks are needed to get the colour I need. I also used the three variations of the spelling for the colours, i.e. all lower case, all capitals or first letter capitals. Please keep up the excellent lessons.
I got to admit. I was skeptical with the small memory size available on the chip, but you've made so many interesting projects out of this. As a practicing computer engineer myself, I was looking for programs/projects to show my son programming. Your teaching style is great. The program is so simple and easy for beginners. It's fun how you taught the class to hold their breath while compiling the code! Love your classes, will follow thru all projects in the series, Nguyen Le
Paul, I believe the RGB series is additive for colored lights. All three lights add to white. Whereas CMY is for printing so there light is absorbed and re-transmitted. All three printed colors give you black. You can see that for your two diagrams. If you did CMY for light bulbs, you wouldn't get black; not sure what you would get. I used to work for a paper company and did printing as part of product development and have a degree in mechanical engineering.
I just keep learning and having fun. I show my wife and 4 boys the projects and they are having fun learning and typing in the colors they want. God's world is so beautiful with all the colors. Thank you LORD! Thank you Mr. McWorter! I am so glad He created you. I am so glad you worked so hard to have the knowledge, understanding, and wisdom (skill) to share with the world. I am so thankful for you to Him. You are just another example of God blessing me. In my life I am surrounded by such great and skilled people.
Great tutorial, Paul! I adapted the program so you input the red level (0-255), green level (0-255), and blue level (0-255), and then turn on the LED appropriately. Easy way to experiment with the colors without changing the code each time. Thanks for all your hard work! Also, and I am probably a minority opinion here, I would love even more theory. I'm sure you'd get lots of pushback, but hey, that's what the fast forward button is for. Personally, I like knowing everything about everything I am doing.
Mr. McWorther! I did this homework! it worked with me, and I of course didn't forget the ping pong ball, here is my code. int rPin=12; int gPin=8; int bPin=7; String ledColour; int dt=1000; String error="You didn't write an option, please try again."; String msg="What colour led do you want?"; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(rPin,OUTPUT); pinMode(bPin,OUTPUT); pinMode(gPin,OUTPUT); } void loop() { // put your main code here, to run repeatedly: Serial.println(msg); while(Serial.available()==0){
this is fun. in order to make it portable, I redid this assignment to add a pot. instead of serial input. then I scaled the pot value 11/1023 and used the if statements based on the calculated integer value. can change color by dialing the pot, no computer needed.
When I saw this lesson and the one before it i decided to make a totally different code I used three potentiometers all have the same resistance I depended on the code from the dimmable led lesson I love your tutorials by the way 😃😀
Yet another most excellent tutorial from The Dude. Thanks for these videos, mate, they are absolutely brilliant and it's real fun to experiment with the different colours in this particular project. Keep an eye out in your postal box, mate.....you never know!
Excellent stuff Paul. I started with arduino a couple of months ago so some of your earlier videos have just been recapping what I have already picked up. The lessons are all very well presented and everything explained properly and I'm now learning things I hadn't previously seen or worked out for myself. I do, however, have two problems/questions: 1. Whilst I enjoy a nice mug of strong, black coffee, it has to be hot; i can't get on with iced coffee. Am I still allowed to watch your videos? 2. I keep getting compile errors when uploading sketches. How do get my dog to hold her breath to stop this happening?
Thanks for your excellent tutorials, I am a retired Naval aviator who progressed into flight sim. and took on the challenge to create my own flight instruments. Arduino turned out to be perfect, even for a seventy year old! Just one question, it's still winter here in the south of England, can I have hot coffee please ?
Hi Paul, Thanks again for a most excellent series of tutorials to help us oldies learn a new trade. Something to keep the brain from freezing & fully active. Just a bit of assistance in helping you beat the auto iris function that stops one from seeing the effect of the LED when a colour is activated. How about trying to reflect the colour back to the breadboard. That will enable you to see the mixed colour better as the RGB Led is never able to give a fully accurate colour rendition ie you can never get a true yellow from the RGB. It always leads to greeny-red. The study of colour reproduction via LED Lighting for TV is fascinating and is ongoing in the Lighting Industry.
Paul, Still watching and learning, Sir! I noticed you started to add a delay in the loop with a integer, then declared a variable int dt=1000; , but did not use it in the loop, but I did, BOOM! NOTE: I did a Crazy mind thing whereas I declared my variable as buzzPin=8; however every time I called the variable I input bussPin, need more coffee!!! Thanks, Gary
Using the skill gained from you excellent tutorials, I wrote a little sketch that prompts you to input in the red, then green, then blue values. This allowed me to quickly set the colour without having to modify and compile/upload each time. Just checked the Arduino reference and, like most languages, there is a random number function. I will try to do a sketch where the arduino continually generates random colours.
You can do random colors, or more interesting is to try to make colors that seems to slowly and smoothly go through an infinite variety of colors, like a constantly changly color wheel.
I've played with this setup for a while and it worked out really well, of course I wasn't pushing for 16x10^6 colors but it is fun. I though about trying a random number generator and will continue just for the heck of it, who knows what I'll get. Thanks Paul.
Tip: You can get any color you want by knowing the hex value of that color and converting it to RGB color value. For this, I'd recommend simply in google write 'rgb to hex'. It will give you a color to select and displays the rgb value of that color. Plug that rgb value in this project and voila, you get the same color.
I would appreciate a full explanation on this if you can find the time. I am great full for all the time that you put into these videos!! They are the best learning tool I have ever found!
Pauly, the color blend works great. When I don't leave out punctuation, or type in the wrong place. But, Kuerig cups are really echo unfriendly and not economical.
I have one doubt, earlier in videos you mentioned only ~3,~5,~6,~9,~10,~11 are used for PWM and in these videos we are using pin 8, 9 and 10 and we are giving analogWrite to all three of them for mixing colors. How would the analogWrite command work on Pin 8 as it is not a PWM pin?
Actually, I think we should all start raising rabbits, chickens, and get some sustainable gardens going. Then study welding or carpentry. The world is changing, and many people will very soon find themselves to be obsolete.
I am following your videos and learning an a lot. But I have a request for you to make a video about E - 3, which you said you might make. I would like to understand this engineering concept! you are the best teacher I have ever had!!
I must have the wrong type of RGB led? I could not seem to get the yellow to work, it was fine on all the other colours? Great video as always Paul, thank you.
I think the RGB LED can not mix colors too well unless you do what Paul did, putting a white ping pong ball over it. I do not know if you did that or not. Samuel
Very cool. Thanks to you Paul, and a little of my own imagination, I figure I just wrote some code that will eventually show all 16,777,216 colors. Check this out: BTW, didn't have a ping-pong ball, so I used a cotton ball help mix the colors. int redLED=9; int blueLED=6; int greenLED=5; int redLevel; int blueLevel; int greenLevel; void setup() { // put your setup code here, to run once: Serial.begin (115200); pinMode(redLED,OUTPUT); pinMode(blueLED,OUTPUT); pinMode(greenLED,OUTPUT); } void loop() { analogWrite (redLED,redLevel); analogWrite (greenLED,greenLevel); analogWrite (blueLED,blueLevel); Serial.print ("red = "); Serial.println (redLevel); Serial.print ("green = "); Serial.println (greenLevel); Serial.print ("blue = "); Serial.println (blueLevel); Serial.println(); delay (1000); if (redLevel>255){ (redLevel=redLevel-259); } if (greenLevel>255){ (greenLevel=greenLevel-261); } if (blueLevel>255){ (blueLevel=blueLevel-263); } redLevel=(redLevel=redLevel+3); greenLevel=(greenLevel+5); blueLevel=(blueLevel+7); }
Another treasure trove Paul. many thanks from a 81 year old newbie in the UK. Already looking forward to the next lesson.
out of curiosity do you still do stuff with arduino?
I used a potentiameter and 2 pullup resistors with RGB LED and switch between main colors by tapping a key, adjusting the strength of each color by turning the nub, and clicking another button to set the color. It's amazing!!!
You Excel
Thanks. That's a great project idea.
Nice I used three potentiometers to adjust each colour with analogRead and analogwrite
Thanks for the advice... I'll surely try it
I did it... Thanks
Superb idea
That's cool. Nice idea.
Because of your lessons I was able to connect 3 potentiometers with 1 RGB LED and code everything on my own. Each potentiometer had its own task (red, green, blue) and I was able to convert the 0 - 1023 to 0 - 255 and send the signals to the RGB LED to create any color I wanted. Thank you for having this channel available to us!
Hey Paul, just want to say I've been trying to learn Arduino while quarantined due to COVID-19 and have been learning so much from these tutorials. Thanks for making the learning process so fun, can't wait to learn more from this series!
I want to thank you for these videos! I am at 21 now and did a sideproject where I used three pot meters to adjust the levels of the led. All with stuff I learned from you!! Thanks again!!
So I'm 21 lessons in and I have really gotten the hang of it up to this point. Thanks for this great series.
This was my solution to the exercise at the end of lesson 20. I was using a common Anode RGB LED, so using analog,Write a value of 0 switched the colour on, and 255 switched it off, with corresponding values inbetween to mix the colours. Also inserted 3 potentiometers into the circuit which enabled me to mix the colour by turning the pot. Great lectures as always. Really helping me to learn and use my kit.
Just came back from holiday without Internet. Happy to catch up soon and try this colours with 3 potmeters I think. Thank you for this lesson.
I would also to thankyou for all you do , i'm a little late to the Arduino party being medically retired after some 40 ish years being a mechanic i was going stir crazy with nothing to do being physically challenged ;, now am learning again and you make it so interesting (thankyou for spelling colour the English way as that is were i'm from )👍
LEGEND!
Hello Mr. McWhorter. Thankyou for your wonderful lessons. We have learned a lot from this one too. Our LED light was brilliant! We made so many diffirent colors with it, and we can't wait to learn how to make black. Thank you very much! 😄
The Elegoo kit is the best thing I ever purchased! Even though this stuff has so many potential real-world applications for work, this is very fun to play around with!
Paul, your videos are a life saver! I've enjoyed every one so far and i genuinely feel like I'm retaining the information, and I'm able to apply the knowledge on projects outside of what you cover in the videos. I plan on watching every one of your videos in this series, thank you so much for all the time you've committed to this!
Great, i added a config section so that you can use 3 potenciometers to configure new colors, it shows the R G B value in the serial monitor so its easier to make more colors. And all thanks to all these videos. you are awsome.
Love your lessons, appreciate the time you have put in to them.
Hi Paul, Really enjoying these. I am a pastor who started as a ChemE. I wrote a program to input the 3 color values and then analog print the three values to the RGB pins so you could easily input whatever color you want from the chart. Your lessons are very helpful. I programmed in FORTRAN years ago. Very nice refresher course with the Arduino.
Being the exploring type, I came up with an interesting variation.
Using for loops and and an if statement, I wrote a sketch that continuously cycles the RGB LED through al the colors from red to yellow to green to cyan to blue to magenta to red, and all colors in between. Of course I used a delay to control the speed.
Pretty cool!
Awesome
Having a lot of fun with this class. Even though I have the Elegoo Super Starter Kit, I also have a DrDuino Explorer board that I assembled and am trying to learn how to use. If you are not familiar, the Explorer has a lot of components and devices installed as a very flexible bread board. I can talk directly to many of the devices on board, or switch them out and use the GPIO pins to talk to a conventional Breadboard. Today I used it to play with the RGB LED. Instead of entering numbers via the Serial comms, I used the three on-board Pots. Read them via analog pins, converted to PWM values, and sent the numbers to the LED. Therefore I can adjust the three pots to create any color I want. So much fun! Thanks for this great class!
Got my RGB LED's in and back in business. Great colors and great video!!
Yeah, I love these videos man, thank you. Now I am even listening to them in the car on the way to work and back for the 'first time through'. When I get home I am excited to try a project or two that you covered.
Glad to hear it!
Another great tutorial. I have now also started to follow the Fusion 360 tutorials, which are explained better by you from the basics.
Others immediately start with 3D drawings and the learning curve is, at least for me, too steep.
Creating colours, using electronics and software, was not something had ever expected to happen. I imagine an 84 year old purchasing table tennis balls generated some strange looks. Because your lessons are so clear and you reinforce information (not just resistors but current limiting resistors) I have been able to play with this program and fun does not begin to describe it.
Excellent!
Dear Paul, I want to thank you for teaching me Arduino. I dont think I would have gotten into Arduino without you. I love your effort and how you make these videos fun. Keep it up! :D
Hats off Paul on yet another cool project. I got this far in following the tutorials and at this point I decided to improve a little bit. Namely, I decided to put this little RGB "lamp" on a continuous loop to increase/decrease gradually all the colors, each LED going from 0 to 255. So I decided to write 2 loops using the "for" command and I told Arduino to start from zero on each LED and gradually increase the voltage to max 255 by using the ++ command. This way I was trying to get through all the possible combinations of RGB gradually. The second loop was the opposite. I used the "for" command to start from 255 and decrease the voltage by - - . Unfortunately I discovered that I still have to practice a bit more since something went south somewhere in these loops. I won't stop though. I will stick around until I learn some more. Blessings from British Columbia, Canada.
Hi Paul, I got all this to work and really enjoyed the process. I even tried to get the colour or color BLACK. Then I Google it and found that Black or black is actually an ultra violet light: that was very interesting. I think I'll look more into this phenomenon in the near future. Thanks again for a very informative and interesting lesson.
So I just combined what I lerned from this tutorial with what I lerned from tutorial 14 and made the same thing but where I used potentiometers to adjust the colourscale. Never could have done it without you help! Thank you!
Bought back memories of setting up old CRT tellies, our trick was, to make it a perfect black and white, when that was correct, we could add in chrominance, that being the colour signal.
Wow 16 million colors, that's crazy. Maybe someday I'll make a matrix of rgb leds and multiplex and control it with a pi for background ambience. Thank you Mr. Mcwhorter, great lesson.
Great one, this is right up my ally...trying to build a sprectrum alalyzer with led strips and this is the basis for the whole thing. Thanks Paul
As a British listener I can't speak for everyone but I personally loved the "Colour"!
That was a great assignment. Great way to practice the code and play with the agalogWrite numbers. I messed around for a couple hours trying to get all the colors just right before I moved one to this video. Compared my numbers to yours and I was pretty close. Learned a lot on that assignment. Thanks.
I think, for flexibility...
best to utilize pins that can be used for both digitalWrite(); and analogWrite();
Pins like ~11 (redPin), ~10 (greenPin), ~9 (bluePin)
Thank you Sir Paul for this great lesson!
i did this as the homework from lesson 20. it was nice being able to sit back and relax through this brief lesson. sorry about the coffee. i always come equipped with basically the same mug as yours, only hot since its only 20F here.
I am watching your video over and over again. I do not want to miss your any magic what you want to make for us. God bless you. Thank you.
Wow, thank you
Did the assignment and even did it for Caps trying to jump ahead , Great Job!!!
67 years old and learning. Thanks Paul.
67 years YOUNG
Definitely a thumbs up on this one! And I am going to wire and code this one up for sure. Thanks for all you do.
Your lessons have really helped me. I have a passion for electronics and watch many videos on youtube but yours really make it simple and fun. keep up the good work.
Cool, thanks!
I was biting my nails the whole video waiting for the moment you tried to change the values on the red pin since it's not connected to an analog pin... And it never happened xD
But hey, I know pin 8 is not an analog pin thanks to you. Very good tutorials. I'm learning a lot. Keep the good work and thank you.
Using a loop to set integer values for each colour of the RGB LED.
here's the code! it uses a loop to ask a question and then uses a function to input the values:
int redpin=9;
int greenpin=10;
int bluepin=11;
String setmsg="Would you like to set a colour for RGB LED?";
String redmsg="What value do you want for colour red?";
String greenmsg="What value do you want for colour green?";
String bluemsg="What value do you want for colour blue?";
String answer;
int redval;
int greenval;
int blueval;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(redpin,OUTPUT);
pinMode(greenpin,OUTPUT);
pinMode(bluepin,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(setmsg);
while (Serial.available()==0){
}
answer=Serial.readString();
if(answer=="yes"){
RGB();
}
}
void RGB(){
Serial.println(redmsg);
while (Serial.available()==0){
}
redval=Serial.parseInt();
analogWrite(redpin,redval);
Serial.println(greenmsg);
while(Serial.available()==0){
}
greenval=Serial.parseInt();
analogWrite(greenpin,greenval);
Serial.println(bluemsg);
while(Serial.available()==0){
}
blueval=Serial.parseInt();
analogWrite(bluepin,blueval);
}
thanks for sharing the code. its excellent!
Thank you so much for this.
Mixing red, green, and blue using three different potentiometers and seeing them work is an awesome thing.
Couldn't agree more!
Well, knowing nothing about Electronics or Arduino I came across one of Paul's RUclips videos. I'm hooked, got the kit and I'm working through the videos. They are amasing (note UK spelling :-) ). Thanks Paul.
Hi Paul, Greetings from Scotland. excellent lesson again. Thanks for the UK spelling of colour, much appreciated. To help me with the values for the colours I downloaded a decimal colour chart from Pinterest. This gives me a good idea of the colour and the value for the RGB and only minor tweaks are needed to get the colour I need. I also used the three variations of the spelling for the colours, i.e. all lower case, all capitals or first letter capitals. Please keep up the excellent lessons.
Works great! Thanks for the lesson!
I got to admit. I was skeptical with the small memory size available on the chip, but you've made so many interesting projects out of this.
As a practicing computer engineer myself, I was looking for programs/projects to show my son programming. Your teaching style is great. The program is so simple and easy for beginners.
It's fun how you taught the class to hold their breath while compiling the code!
Love your classes, will follow thru all projects in the series,
Nguyen Le
Hello sir, fun thing, my father is actually an engineer himself and recommended me to watch these so are you sure you're not my long-lost father? 😅
Paul, I believe the RGB series is additive for colored lights. All three lights add to white. Whereas CMY is for printing so there light is absorbed and re-transmitted. All three printed colors give you black. You can see that for your two diagrams. If you did CMY for light bulbs, you wouldn't get black; not sure what you would get. I used to work for a paper company and did printing as part of product development and have a degree in mechanical engineering.
I just keep learning and having fun. I show my wife and 4 boys the projects and they are having fun learning and typing in the colors they want. God's world is so beautiful with all the colors. Thank you LORD!
Thank you Mr. McWorter! I am so glad He created you. I am so glad you worked so hard to have the knowledge, understanding, and wisdom (skill) to share with the world. I am so thankful for you to Him. You are just another example of God blessing me. In my life I am surrounded by such great and skilled people.
dear teacher, if i lived on USA it sure i would take a big box of coffee for you.
Great tutorial, Paul! I adapted the program so you input the red level (0-255), green level (0-255), and blue level (0-255), and then turn on the LED appropriately. Easy way to experiment with the colors without changing the code each time. Thanks for all your hard work!
Also, and I am probably a minority opinion here, I would love even more theory. I'm sure you'd get lots of pushback, but hey, that's what the fast forward button is for. Personally, I like knowing everything about everything I am doing.
It's simply amazing to me that you can do so much with this kit!!
This one is relatively easy due to many years using Photoshop with my digital photography. As always though perfectly explained.
Wow thank you so much Mr Paul. These lessons have been great for me. I've learned so much. From just a few lessons.
Plenty of Kurig " Verona" being consumed in your honor while watching these very instructional videos.. Thanks
Enjoy!
Much appreciating the love for your British listeners :D
Thank you so much sir, I'm following along with your tutorials
Mr. McWorther! I did this homework! it worked with me, and I of course didn't forget the ping pong ball, here is my code.
int rPin=12;
int gPin=8;
int bPin=7;
String ledColour;
int dt=1000;
String error="You didn't write an option, please try again.";
String msg="What colour led do you want?";
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(rPin,OUTPUT);
pinMode(bPin,OUTPUT);
pinMode(gPin,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(msg);
while(Serial.available()==0){
}
ledColour=Serial.readString();
if(ledColour=="Blue"||ledColour=="blue"){
digitalWrite(bPin,HIGH);
digitalWrite(gPin,LOW);
digitalWrite(rPin,LOW);
}
if(ledColour=="Green"||ledColour=="green"){
digitalWrite(bPin,LOW);
digitalWrite(gPin,HIGH);
digitalWrite(rPin,LOW);
}
if(ledColour=="Red"||ledColour=="red"){
digitalWrite(bPin,LOW);
digitalWrite(gPin,LOW);
digitalWrite(rPin,HIGH);
}
if(ledColour=="Off"||ledColour=="off"){
digitalWrite(bPin,LOW);
digitalWrite(gPin,LOW);
digitalWrite(rPin,LOW);
}
if(ledColour=="Aqua"||ledColour=="aqua"){
analogWrite(rPin,0);
analogWrite(gPin,255);
analogWrite(bPin,75);
}
if(ledColour=="Cyan"||ledColour=="cyan"){
analogWrite(rPin,0);
analogWrite(gPin,255);
analogWrite(bPin,125);
}
if(ledColour=="Magenta"||ledColour=="magenta"){
analogWrite(rPin,255);
analogWrite(gPin,0);
analogWrite(bPin,150);
}
if(ledColour=="Fuscha"||ledColour=="fuscha"){
analogWrite(rPin,153);
analogWrite(gPin,0);
analogWrite(bPin,77);
}
if(ledColour=="Yellow"||ledColour=="yellow"){
analogWrite(rPin,255);
analogWrite(gPin,175);
analogWrite(bPin,0);
}
if(ledColour=="Orange"||ledColour=="orange"){
analogWrite(rPin,255);
analogWrite(gPin,65);
analogWrite(bPin,0);
}
delay(dt);
}
Great video and easy to follow. Last night the homework was easy and fun.
Great job!
this is fun. in order to make it portable, I redid this assignment to add a pot. instead of serial input. then I scaled the pot value 11/1023 and used the if statements based on the calculated integer value. can change color by dialing the pot, no computer needed.
best teacher I have never see!!!
When I saw this lesson and the one before it i decided to make a totally different code
I used three potentiometers all have the same resistance
I depended on the code from the dimmable led lesson
I love your tutorials by the way 😃😀
Yet another most excellent tutorial from The Dude. Thanks for these videos, mate, they are absolutely brilliant and it's real fun to experiment with the different colours in this particular project. Keep an eye out in your postal box, mate.....you never know!
welcome back :) nice tutorial as before..many thanks for your big effort to let us learn
Excellent stuff Paul. I started with arduino a couple of months ago so some of your earlier videos have just been recapping what I have already picked up. The lessons are all very well presented and everything explained properly and I'm now learning things I hadn't previously seen or worked out for myself. I do, however, have two problems/questions:
1. Whilst I enjoy a nice mug of strong, black coffee, it has to be hot; i can't get on with iced coffee. Am I still allowed to watch your videos?
2. I keep getting compile errors when uploading sketches. How do get my dog to hold her breath to stop this happening?
In this lesson i cashup some instructions and commands also some of the order but today im good and ready for the future. Thanks :)
Thanks for all the great videos! An RGB color picking site is also very useful to make colors
how some boudy look till lesson 21 and dount like it ?? on of best techer i ever have.
This time it all worked out, Paul. Moving on to lesson 22.
Most Excellent!
Even a DEAD one sleeping inside a grave for years can start programming an Arduino from you Sir. Thanks a lot for your efforts.
Thanks for your excellent tutorials, I am a retired Naval aviator who progressed into flight sim. and took on the challenge to create my own flight instruments. Arduino turned out to be perfect, even for a seventy year old! Just one question, it's still winter here in the south of England, can I have hot coffee please ?
Yes, as long as you do not put sugar in it.
Your each and every vidio important for students to understand Arduino. Thanks for helping.
So nice of you
@@paulmcwhorter Thank you.
Hi Paul, Thanks again for a most excellent series of tutorials to help us oldies learn a new trade. Something to keep the brain from freezing & fully active. Just a bit of assistance in helping you beat the auto iris function that stops one from seeing the effect of the LED when a colour is activated. How about trying to reflect the colour back to the breadboard. That will enable you to see the mixed colour better as the RGB Led is never able to give a fully accurate colour rendition ie you can never get a true yellow from the RGB. It always leads to greeny-red. The study of colour reproduction via LED Lighting for TV is fascinating and is ongoing in the Lighting Industry.
Great follow up to the last one! I love the homework... I have rarely ever said that... wow... pinching myself... Ouch! This is real.
Paul, Still watching and learning, Sir! I noticed you started to add a delay in the loop with a integer, then declared a variable int dt=1000; , but did not use it in the loop, but I did, BOOM! NOTE: I did a Crazy mind thing whereas I declared my variable as buzzPin=8; however every time I called the variable I input bussPin, need more coffee!!! Thanks, Gary
We can also use potentiometers to play with the colors
Using the skill gained from you excellent tutorials, I wrote a little sketch that prompts you to input in the red, then green, then blue values. This allowed me to quickly set the colour without having to modify and compile/upload each time. Just checked the Arduino reference and, like most languages, there is a random number function. I will try to do a sketch where the arduino continually generates random colours.
You can do random colors, or more interesting is to try to make colors that seems to slowly and smoothly go through an infinite variety of colors, like a constantly changly color wheel.
I've played with this setup for a while and it worked out really well, of course I wasn't pushing for 16x10^6 colors but it is fun. I though about trying a random number generator and will continue just for the heck of it, who knows what I'll get. Thanks Paul.
Just what I was needing for my modeling...now just need to fade from one colour to another!
Tip: You can get any color you want by knowing the hex value of that color and converting it to RGB color value. For this, I'd recommend simply in google write 'rgb to hex'. It will give you a color to select and displays the rgb value of that color. Plug that rgb value in this project and voila, you get the same color.
I went a bit further and connected three pots to analog-in pins and used those variable values to change the intensities of the RGB LED.
I would appreciate a full explanation on this if you can find the time. I am great full for all the time that you put into these videos!! They are the best learning tool I have ever found!
Watch the LIVE Shop talk I posted today
Got my Arduino and started watching your videos yesterday, already on this lesson now. The videos are great man, thanks
Glad you like them!
Thank you using the UK spelling of color. I enjoy the homework to.
Pauly, the color blend works great. When I don't leave out punctuation, or type in the wrong place. But, Kuerig cups are really echo unfriendly and not economical.
Thank You Sir for introducing analogWrite here for producing almost any color...got difficulty in producing Orange Colour though.
Excellent lessons. I am progressing
Nice tutorial. I will try a program using the one potentiometer per color and see if i can adjust the colours by twisting the dials.
just enjoying your tutorials and humour !!!!
Amazing in Quarantine Indeed
love you paul
I have one doubt, earlier in videos you mentioned only ~3,~5,~6,~9,~10,~11 are used for PWM and in these videos we are using pin 8, 9 and 10 and we are giving analogWrite to all three of them for mixing colors. How would the analogWrite command work on Pin 8 as it is not a PWM pin?
I saw the same thing, the red was always 0 or 255 so LOW or HIGH so it didn't cause a problem
Great series...Thank you!!!!.....UK student
He really said, "Here's my address, hook a brother up with a Keurig."
Actually, I think we should all start raising rabbits, chickens, and get some sustainable gardens going. Then study welding or carpentry. The world is changing, and many people will very soon find themselves to be obsolete.
I had a great time doing this one. Thanks.
Sir, you are a real blessing
Turn the voltage down to your LEDs that way it shows up better on camera
I am following your videos and learning an a lot. But I have a request for you to make a video about E - 3, which you said you might make. I would like to understand this engineering concept! you are the best teacher I have ever had!!
Not sure what is referred to by "E-3", can you use more words to describe what you are asking
More mixing colours. Fun!
Thank you! Cheers!
Absolutely splendid, thanks!
Glad you enjoyed it!
I must have the wrong type of RGB led? I could not seem to get the yellow to work, it was fine on all the other colours? Great video as always Paul, thank you.
I think the RGB LED can not mix colors too well unless you do what Paul did, putting a white ping pong ball over it. I do not know if you did that or not.
Samuel
Very cool. Thanks to you Paul, and a little of my own imagination, I figure I just wrote some code that will eventually show all 16,777,216 colors. Check this out:
BTW, didn't have a ping-pong ball, so I used a cotton ball help mix the colors.
int redLED=9;
int blueLED=6;
int greenLED=5;
int redLevel;
int blueLevel;
int greenLevel;
void setup() {
// put your setup code here, to run once:
Serial.begin (115200);
pinMode(redLED,OUTPUT);
pinMode(blueLED,OUTPUT);
pinMode(greenLED,OUTPUT);
}
void loop() {
analogWrite (redLED,redLevel);
analogWrite (greenLED,greenLevel);
analogWrite (blueLED,blueLevel);
Serial.print ("red = ");
Serial.println (redLevel);
Serial.print ("green = ");
Serial.println (greenLevel);
Serial.print ("blue = ");
Serial.println (blueLevel);
Serial.println();
delay (1000);
if (redLevel>255){
(redLevel=redLevel-259);
}
if (greenLevel>255){
(greenLevel=greenLevel-261);
}
if (blueLevel>255){
(blueLevel=blueLevel-263);
}
redLevel=(redLevel=redLevel+3);
greenLevel=(greenLevel+5);
blueLevel=(blueLevel+7);
}