Arduino Tutorial 21: Understanding and Mixing Primary Colors with an RGB LED

Sdílet
Vložit
  • čas přidán 3. 08. 2024
  • You guys can help me out over at Patreon, and that will keep this high quality content coming:
    / paulmcwhorter
    In this lesson we introduce the concept of primary color systems, and look at RGB and CMY systems. We use an RGB LED to mix colors to create the CMY colors. This lesson builds on the work done in lesson 20.
    You can get the kit I am using for this series at the following link:
    amzn.to/2I7N4Ek
    You can follow these lessons on our WEB site HERE:
    toptechboy.com/arduino-tutori...
    [Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. This means if you visit the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.]
    #Arduino
  • Věda a technologie

Komentáře • 337

  • @sammydogruby
    @sammydogruby Před 5 lety +35

    Another treasure trove Paul. many thanks from a 81 year old newbie in the UK. Already looking forward to the next lesson.

    • @rogobil6897
      @rogobil6897 Před měsícem +1

      out of curiosity do you still do stuff with arduino?

  • @mortezapayandeh5925
    @mortezapayandeh5925 Před 4 lety +33

    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!!!

  • @leonhardeuler8457
    @leonhardeuler8457 Před 4 lety +36

    Nice I used three potentiometers to adjust each colour with analogRead and analogwrite

  • @karelenmarritkruyswijk393

    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.

  • @ob1895
    @ob1895 Před 9 měsíci +2

    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! 😄

  • @garrettcowan7053
    @garrettcowan7053 Před 3 lety +3

    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!

  • @malicegarden
    @malicegarden Před 3 lety +2

    So I'm 21 lessons in and I have really gotten the hang of it up to this point. Thanks for this great series.

  • @michaelromeo5658
    @michaelromeo5658 Před 3 měsíci

    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

  • @Guru2Kid
    @Guru2Kid Před 4 lety +12

    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!

  • @lisecd1
    @lisecd1 Před rokem +3

    Love your lessons, appreciate the time you have put in to them.

  • @Stinky_bolla
    @Stinky_bolla Před 2 lety +2

    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!!

  • @emryscass7327
    @emryscass7327 Před 4 lety +1

    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!

  • @michaeljenkins2345
    @michaeljenkins2345 Před 3 lety +2

    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!

  • @shagwagg1
    @shagwagg1 Před 4 lety +1

    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.

  • @victorfransson1216
    @victorfransson1216 Před 4 lety

    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!

  • @billcrow5403
    @billcrow5403 Před 4 lety +4

    Got my RGB LED's in and back in business. Great colors and great video!!

  • @phil-ml6nd
    @phil-ml6nd Před rokem +1

    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 )👍

  • @Aes-nt1tn
    @Aes-nt1tn Před rokem +3

    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!

  • @gilnasty82
    @gilnasty82 Před 2 lety

    It's simply amazing to me that you can do so much with this kit!!

  • @glennfelpel9785
    @glennfelpel9785 Před 5 lety +4

    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.

  • @purretd8455
    @purretd8455 Před 2 lety

    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

  • @alanbolek4364
    @alanbolek4364 Před 3 lety

    Did the assignment and even did it for Caps trying to jump ahead , Great Job!!!

  • @jaydusterhoff2795
    @jaydusterhoff2795 Před 2 lety

    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.

  • @CiscoSaeed
    @CiscoSaeed Před 5 lety +1

    welcome back :) nice tutorial as before..many thanks for your big effort to let us learn

  • @simontopley4771
    @simontopley4771 Před 11 měsíci +1

    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.

  • @mikemanny1533
    @mikemanny1533 Před 4 lety

    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!

  • @misterdecaro
    @misterdecaro Před 2 lety +1

    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.

  • @manuelaviles1534
    @manuelaviles1534 Před 4 lety +2

    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.

  • @supermardy1
    @supermardy1 Před 2 lety

    Wow thank you so much Mr Paul. These lessons have been great for me. I've learned so much. From just a few lessons.

  • @muhammadrafiqulislamkhan6994

    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.

  • @nurgarciaterrassa8593
    @nurgarciaterrassa8593 Před rokem +1

    Works great! Thanks for the lesson!

  • @liviuconstantin9960
    @liviuconstantin9960 Před 4 lety

    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.

  • @markrichards7533
    @markrichards7533 Před 3 lety

    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.

  • @terencebarber4269
    @terencebarber4269 Před 3 lety

    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.

  • @preetamsingh147
    @preetamsingh147 Před 3 lety +2

    Thank you so much sir, I'm following along with your tutorials

  • @oldcrazyeye6482
    @oldcrazyeye6482 Před 3 lety

    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.

  • @chetk4624
    @chetk4624 Před 4 lety

    I had a great time doing this one. Thanks.

  • @EnterMyNameHere
    @EnterMyNameHere Před 3 lety +2

    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.

  • @markfuentes3666
    @markfuentes3666 Před 4 lety

    Loving these lessons

  • @Hino_55
    @Hino_55 Před 4 lety +2

    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!

  • @davidransier
    @davidransier Před rokem

    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!

  • @erygion
    @erygion Před 4 lety +3

    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.

  • @ameenali6125
    @ameenali6125 Před 3 lety

    Thanks for all the great videos! An RGB color picking site is also very useful to make colors

  • @Fr0ug
    @Fr0ug Před 4 lety

    I love your classes!

  • @turion57
    @turion57 Před 27 dny

    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.

  • @stevehof2249
    @stevehof2249 Před 4 lety

    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.

  • @lestaylor1888
    @lestaylor1888 Před 3 lety

    Well, knowing nothing about Electronics or Arduino I came across one of Paul's CZcams videos. I'm hooked, got the kit and I'm working through the videos. They are amasing (note UK spelling :-) ). Thanks Paul.

  • @robertwebb9657
    @robertwebb9657 Před 2 lety

    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.

  • @user-cy3je1xd1c
    @user-cy3je1xd1c Před 4 lety

    It works great! Thanks for making such cool videos!

  • @opalprestonshirley1700

    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.

  • @davidamoody
    @davidamoody Před 4 lety

    Awesome, thanks again for another great tutorial!

  • @SusanAmberBruce
    @SusanAmberBruce Před 5 lety +14

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

    • @kotian9
      @kotian9 Před 3 lety +1

      thanks for sharing the code. its excellent!

    • @JP-zo5uk
      @JP-zo5uk Před rokem

      Thank you so much for this.

  • @cobi2a
    @cobi2a Před 3 lety

    In this lesson i cashup some instructions and commands also some of the order but today im good and ready for the future. Thanks :)

  • @neskashev
    @neskashev Před 3 lety

    just enjoying your tutorials and humour !!!!

  • @mostafaeltomey9545
    @mostafaeltomey9545 Před 3 lety

    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 😃😀

  • @alfredcalleja450
    @alfredcalleja450 Před rokem +1

    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.

  • @SkepticDanielAReed
    @SkepticDanielAReed Před 4 lety

    Excellent lessons. I am progressing

  • @aaronmilliman7685
    @aaronmilliman7685 Před 2 lety

    Great video and easy to follow. Last night the homework was easy and fun.

  • @jadersoares3659
    @jadersoares3659 Před 10 měsíci +1

    dear teacher, if i lived on USA it sure i would take a big box of coffee for you.

  • @thantsin5316
    @thantsin5316 Před 2 lety

    Thant you for your teaching.

  • @NguyenLe-gs8bf
    @NguyenLe-gs8bf Před rokem

    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

    • @mertthew6332
      @mertthew6332 Před 11 měsíci

      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? 😅

  • @electronichome1153
    @electronichome1153 Před 3 lety

    Absolutely splendid, thanks!

  • @neki277
    @neki277 Před 2 lety

    Thanks Paul.

  • @richardcrook5161
    @richardcrook5161 Před 4 lety

    Great series...Thank you!!!!.....UK student

  • @thomasshaw3760
    @thomasshaw3760 Před 2 lety

    Much appreciating the love for your British listeners :D

  • @m0taro365
    @m0taro365 Před rokem

    Sir, you are a real blessing

  • @MUHAMMADYAWARIFRAHEEM
    @MUHAMMADYAWARIFRAHEEM Před 2 lety

    Very informative video Sir

  • @PRR5406
    @PRR5406 Před 2 lety

    This time it all worked out, Paul. Moving on to lesson 22.

  • @joeylim6454
    @joeylim6454 Před 3 lety

    Amazing in Quarantine Indeed

  • @mehdi_fadaei
    @mehdi_fadaei Před 3 lety

    how some boudy look till lesson 21 and dount like it ?? on of best techer i ever have.

  • @pdlngsqrs9547
    @pdlngsqrs9547 Před 2 lety

    Plenty of Kurig " Verona" being consumed in your honor while watching these very instructional videos.. Thanks

  • @johnm4962
    @johnm4962 Před 2 lety

    thank you paul

  • @EytanKoch
    @EytanKoch Před 2 lety

    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.

  • @bradmitchell876
    @bradmitchell876 Před 10 měsíci

    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.

  • @petermerz2704
    @petermerz2704 Před 3 lety

    Just what I was needing for my modeling...now just need to fade from one colour to another!

  • @wendygrant2735
    @wendygrant2735 Před 2 lety

    More mixing colours. Fun!

  • @dimpledharamsi7704
    @dimpledharamsi7704 Před 2 lety

    It's FUNNNN! Thanks for the tutorial.😄

  • @tanvirahmed8586
    @tanvirahmed8586 Před 2 lety

    Mixing red, green, and blue using three different potentiometers and seeing them work is an awesome thing.

  • @grahamovermyer5987
    @grahamovermyer5987 Před rokem +2

    He really said, "Here's my address, hook a brother up with a Keurig."

    • @paulmcwhorter
      @paulmcwhorter  Před rokem +1

      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.

  • @stevenicholson9224
    @stevenicholson9224 Před 4 lety +1

    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.

  • @user-ys6bc7yh7z
    @user-ys6bc7yh7z Před 10 měsíci

    Thank you very much!

  • @markharrisllb
    @markharrisllb Před 3 lety +1

    This one is relatively easy due to many years using Photoshop with my digital photography. As always though perfectly explained.

  • @anthonyj.dipasqua4676
    @anthonyj.dipasqua4676 Před 3 lety

    Great follow up to the last one! I love the homework... I have rarely ever said that... wow... pinching myself... Ouch! This is real.

  • @muhammadrafiqulislamkhan6994

    Your each and every vidio important for students to understand Arduino. Thanks for helping.

  • @dsbohra
    @dsbohra Před 2 lety

    Even a DEAD one sleeping inside a grave for years can start programming an Arduino from you Sir. Thanks a lot for your efforts.

  • @johnluke9207
    @johnluke9207 Před 2 lety

    Fun stuff, sir!

  • @williambarrett7108
    @williambarrett7108 Před 5 lety

    I bought the elegoo from your link and it has been great but the actual arduino did not work correctly, but I had an original which I have been able to utilize for the videos. Again I appreciate all the work you put into these great videos!!

  • @berryblades
    @berryblades Před rokem

    As a British listener I can't speak for everyone but I personally loved the "Colour"!

  • @user-xz6mk3bn5n
    @user-xz6mk3bn5n Před rokem +1

    best teacher I have never see!!!

  • @williambarrett7108
    @williambarrett7108 Před 5 lety

    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!

  • @frankbonsignore.RochesterNY

    You are the best! Thank you!!!

  • @mester.mechanic
    @mester.mechanic Před rokem +1

    love you paul

  • @GDub1958
    @GDub1958 Před 4 lety +1

    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

  • @garyhart6028
    @garyhart6028 Před 2 lety

    Thank you using the UK spelling of color. I enjoy the homework to.

  • @aynursunagatullin7029
    @aynursunagatullin7029 Před 3 lety

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

  • @angusclarke8592
    @angusclarke8592 Před 2 lety

    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.

  • @jgagne79
    @jgagne79 Před 4 lety

    So fun! :) Thx!

  • @stevencristofero968
    @stevencristofero968 Před rokem

    67 years old and learning. Thanks Paul.

  • @Steve-GM0HUU
    @Steve-GM0HUU Před 3 lety

    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.

    • @paulmcwhorter
      @paulmcwhorter  Před 3 lety

      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.

  • @williambarrett7108
    @williambarrett7108 Před 5 lety

    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!!

    • @paulmcwhorter
      @paulmcwhorter  Před 5 lety

      Not sure what is referred to by "E-3", can you use more words to describe what you are asking