Arduino Tutorial 19: Reading Strings from the Serial Monitor

Поделиться
HTML-код
  • Опубликовано: 5 дек 2024

Комментарии • 1 тыс.

  • @cameronburrell6809
    @cameronburrell6809 Год назад +37

    I’m 12 years old and starting to get into engineering and your tutorials have helped me a lot, thank you!

    • @paulmcwhorter
      @paulmcwhorter  Год назад +27

      Amazing! You are really ahead of your age group. Keep up the hard work, and make good decisions and you will go far in life. Maybe you will even change the world for the better.

  • @geekgloryenglish2822
    @geekgloryenglish2822 3 года назад +26

    We gotta protect Paul.
    He is too Precious.
    Love you Paul!!

  • @bigstickpilot
    @bigstickpilot 5 лет назад +277

    I discovered that the serial monitor window has to be set to "no line ending" or I get uncommanded line returns

    • @jeremyvandenheuvel5621
      @jeremyvandenheuvel5621 5 лет назад +19

      same problem, took me two days

    • @stefanfarier7384
      @stefanfarier7384 4 года назад

      わたしも。。。

    • @coledunlay7876
      @coledunlay7876 4 года назад +4

      Thank you, bigstickpilot. That solved my issues. The program wouldn't enter the if() statement. Apparently the line return was being interpreted as part of the color. Working now!!

    • @kayboku7281
      @kayboku7281 4 года назад +6

      ahhhhhhhhh i had the same problem, ive just spent all morning trying to figure it out, I did read your comment earlier but didnt understand what it meant.

    • @jonnyjohnson5025
      @jonnyjohnson5025 4 года назад +4

      I was having that problem too! Thank you for sharing! I was really annoyed at that.

  • @alanbolek4364
    @alanbolek4364 4 года назад +96

    I learned a hard lesson on "no line ending" Its one i will not forget! Amazing lessons!!

    • @TimberTechWorkshop
      @TimberTechWorkshop 2 года назад +6

      That was my problem too.... thanks for the heads up that solved my problem

    • @charlielowell4077
      @charlielowell4077 2 года назад +4

      I did too! Couldn't figure out why it wouldn't work.

    • @adamhorn8414
      @adamhorn8414 2 года назад +2

      this one got me too

    • @ryanbrownie4634
      @ryanbrownie4634 2 года назад +3

      Thank alot for this had me stuck for hours😣

    • @Bachulia
      @Bachulia 2 года назад +1

      I need felp no line ending where?

  • @Fractal_CZ
    @Fractal_CZ 2 года назад +7

    You have changed me from “I’m fascinated, but I don’t understand arduino” to “I get it, it works” in 2 days. Thank you, sir.

  • @fishseagull8504
    @fishseagull8504 4 года назад +65

    These are the best Arduino tutorials on the entire internet. I love your style of teaching especially your intentional mistakes. Thank you so much!

    • @dimpledharamsi7704
      @dimpledharamsi7704 2 года назад +1

      yes exactly , the intentional mistakes make sure that we learn well. Thanks sir!

  • @lucasmark9656
    @lucasmark9656 2 года назад +4

    I was having so much fun with this one I decided to take it a step further and made it so that any input OTHER THAN "red", "green", or "blue" would read "Sorry, please try again...", and cause all three lights to flash in unison, three times. I would recommend this simple addition to anyone looking to expand on this lesson. It took me a couple of tries, and a little debugging because it wasn't specifically talked about in the lesson, but I got it! and I was more excited than I probably should've been. P.S. If you think you are obsessed with tidy boards, I wish I could show you how organized mine are! Everything perfectly space, my wires all have perfect arches, and I always keep my LED's towards the bottom edge of the board so nothing will overlap them. Thanks for these great lessons!

  • @marksnell3871
    @marksnell3871 4 года назад +2

    Hi Paul, I am a 57year old male b#British stroke survivor, and am struggling with my condition almost a year after my stroke, for some ago I decided to take a rest from my other hobbey (watercolour painting) mainly because it wasnt taxing my poor old damaged brain enough( I havn' t been able to work due to my condition since my stroke and it has hit me very hard as an engineer to feel a sense of uselessness, which is an honest state of my condition, I hope to return to work one day but at this moment in time it is impossible and I hate , but trying to keep my brain active is most important to me, and over the last few months I have learnt so much from your tuition on you tube, although I can only join in for about 20 minutes at a time, before having to rest or sleep ( part of my condition) I enjoy learning a little bit at a time and am sure that it helps with my hopwfull recovery, thank you for being a good teacher, yours sincerely Mark Snell, Cheltenham, Gos, England UK ,once again many thanks

  • @jonaldtrumpeno
    @jonaldtrumpeno 2 года назад +15

    Hi Mr. McWhorter I'm 13 yrs old and want to learn engineering so this series is really helpful to me and the future. Thank you so much for your great teaching. 😁

    • @recon_leech4
      @recon_leech4 11 месяцев назад +2

      same im 12 this dude is really helpful to learn arduino

  • @colepdx187
    @colepdx187 5 лет назад +16

    Here we are at the end of July. When July started I didn't even know what an Arduino was. Now I have an Uno, half a dozen Nanos and a Mega. I have built a sensor 'platform' that has a myriad of sensors and an RTC communicating with clients all talking to each other via NRF24 radio modules, Some clients are for instrumentation others are for data-logging functions. I've used some OLEDs and some 16x2 and 20x4 LCDs. The oleds are nice and the tiny ones are great for mounting below the less-tiny ones to display histograms of the instrument mounted above it. What great fun I'm having and it's all thanks to you taking the time to explain clearly and plainly your knowledge, experience and wisdom.
    Thanks Mr. McWhorter, you get an A+ from me.

    • @paulmcwhorter
      @paulmcwhorter  5 лет назад +2

      Sounds like a productive month!

    • @thanoslampropoulos8132
      @thanoslampropoulos8132 5 лет назад

      @Dirk Gently Do you exaggerate a little? The beginner's level lessons of Mr McWhorter where sufficient to you in order to be able to make such a huge variety of projects? I don't say that the period of a month is not sufficient to do that. I say that the lessons up to now are at a beginner's level, so it's difficult to help you so much.

    • @paulmcwhorter
      @paulmcwhorter  5 лет назад +9

      Note that there are a lot more arduino lessons on my channel than this new series. In the old series I did some really advanced stuff. Also, I dont think he said my channel was his only resource. Hence, I would completely believe him, and the type of learning he describes is how passionate people pursue a new field.

    • @colepdx187
      @colepdx187 5 лет назад +3

      @@thanoslampropoulos8132 What can I say? I absorb like a sponge. Plus I'm just standing on the shoulders of some genius and talented scientists, engineers, programmers and RUclips teachers that have charted this ground well. Paul has done many more advanced videos and I've watched them all. I watch these new ones because he usually imparts some great bits of knowledge from his vast experience.

    • @thanoslampropoulos8132
      @thanoslampropoulos8132 5 лет назад +5

      @@colepdx187 Now I can understand. By mistake, I thought that you listened only to the new series of videos. It's true that Mr McWhorter has made a wonderful job with his series of videos and has publiced some videos with really advanced stuff. Keep up your great work!

  • @ericness9660
    @ericness9660 3 года назад +5

    I added an if condition so that if you don’t write “red”, “blue”, or “green” then the arduino sends this message back to the serial monitor “I didn’t understand that, try using all lower case letters.” If it wasn’t already way past bedtime I’d add a counter so that after a certain number of tries putting in wrong colours the Arduino would spell out the options for you.
    Thanks again for this great tutorial series.

    • @mileshester6939
      @mileshester6939 2 года назад +1

      I foresaw the problem with strings not matching so I just wrote the question to be, "What color do you want, red, green, or blue? " I didn't really think about the obvious letter case problem. I just know my family well enough to know they would see red, green, and blue LEDs there and select yellow or purple.

  • @girishtripathy275
    @girishtripathy275 4 года назад +150

    I seriously feel guilty for not holding my breath everytime his code bugs.

    • @nikobitan7294
      @nikobitan7294 4 года назад +13

      So you're to blame.

    • @fishseagull8504
      @fishseagull8504 4 года назад +6

      You monster

    • @wallymurray620
      @wallymurray620 4 года назад +1

      🤣

    • @rtsempire
      @rtsempire 4 года назад +3

      We found the culprit!

    • @shorifulhaque5137
      @shorifulhaque5137 4 года назад

      Damnit Girish, get your shit together or we're gonna have PROBLEMS. I don't want you wasting any more of MY TIME.

  • @rebeccadoherty3193
    @rebeccadoherty3193 3 года назад +4

    I couldn't figure out why mine wasn't working so I walked away and came back the next day to try with a fresh mind and I still was at a loss untill I came here and found many of you had the same issue and found a solution. Thank you all so much!!!!

    • @mikmaster63
      @mikmaster63 5 месяцев назад

      What’s the solution?

  • @ccastle1049
    @ccastle1049 Год назад +2

    Hello Paul! I'm an English teacher from another country with an interest in your field. Lesson 19 now and I'm still sticking by and doing all you do on the go with you. You're one of the best teachers I've ever met and you've not only inspired me on Arduino lessons but also with your teaching methods too. Thank you for all this. I'm a bit late to this but, love your work!

  • @thyBeren
    @thyBeren 3 года назад +19

    Hello Paul,
    Even though I am a bit late to the party (the magic of youtube) I would like to thank you for your series.
    Great production value, high educational standards with code writing and debugging in mind, funny character that helps you stay engaged and be entertained while learning....but the thing I appreciate above all, as a Greek, is the iced cold coffee!!
    Super excited about this series. Can't wait to complete it so I can move to your Robotics series.
    Once again, thank you for your work, effort, and passion.

  • @abhik1493
    @abhik1493 4 года назад +1

    Hello Sir!, I watched your video and it was very good! And FYI It was not me, I always hold my breath:) Though after we did the project I decided to take it up a notch. If anyone wants to use this code feel free to do so just hook up the red led to pin 8, green led to pin 11, and blue led to pin 12, as that's what I used while making this program. Here it is:
    int red = 8;
    int green = 11;
    int blue = 12;
    String msg = "What color LED do you want to light up?";
    String msg2 = "How many seconds do you want the LED to light up?";
    String msg3 = "How many times you you want to blink the LED?";
    int ledTime;
    int blinkCount;
    int j;
    float rdt;
    float seconds;
    int rlt;
    float delayTime;
    float delayTime2;
    String myColor;
    void setup() {
    // put your setup code here, to run once:
    Serial.begin(9600);
    pinMode (red, OUTPUT);
    pinMode (green, OUTPUT);
    pinMode (blue, OUTPUT);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    Serial.println(msg);
    while(Serial.available()==0){

    }
    myColor = Serial.readString();
    if (myColor == "red"){
    Serial.println("RED");

    Serial.println(msg2);
    while(Serial.available()==0){

    }
    seconds = Serial.parseInt();

    ledTime = seconds * 1000;
    Serial.println(seconds);
    Serial.println(msg3);
    while(Serial.available()==0){

    }
    blinkCount = Serial.parseInt();
    Serial.println(blinkCount);
    delayTime = (ledTime/blinkCount);
    delayTime2 = (delayTime/2);
    for (j = 0; j < blinkCount; j = j+1){


    digitalWrite(blue, LOW);
    digitalWrite(green, LOW);
    digitalWrite(red, HIGH);
    delay(delayTime2);
    digitalWrite(red, LOW);
    delay(delayTime2);

    }


    }
    if (myColor == "green"){
    Serial.println("GREEN");

    Serial.println(msg2);
    while(Serial.available()==0){

    }
    seconds = Serial.parseInt();

    ledTime = seconds * 1000;
    Serial.println(seconds);
    Serial.println(msg3);
    while(Serial.available()==0){

    }
    blinkCount = Serial.parseInt();
    Serial.println(blinkCount);
    delayTime = (ledTime/blinkCount);
    delayTime2 = (delayTime/2);
    for (j = 0; j < blinkCount; j = j+1){


    digitalWrite(blue, LOW);
    digitalWrite(red, LOW);
    digitalWrite(green, HIGH);
    delay(delayTime2);
    digitalWrite(green, LOW);
    delay(delayTime2);

    }


    }
    if (myColor == "blue"){
    Serial.println("BLUE");

    Serial.println(msg2);

    while(Serial.available()==0){

    }
    seconds = Serial.parseInt();

    ledTime = seconds * 1000;

    Serial.println(seconds);
    Serial.println(msg3);
    while(Serial.available()==0){

    }
    blinkCount = Serial.parseInt();
    Serial.println(blinkCount);
    delayTime = (ledTime/blinkCount);

    delayTime2 = (delayTime/2);


    for (j = 0; j < blinkCount; j = j+1){


    digitalWrite(green, LOW);
    digitalWrite(red, LOW);
    digitalWrite(blue, HIGH);
    delay(delayTime2);
    digitalWrite(blue, LOW);
    delay(delayTime2);

    }


    }
    if (myColor == "stop"){
    digitalWrite(red, LOW);
    digitalWrite(green, LOW);
    digitalWrite(blue, LOW);
    }
    }

  • @meJoKeR65
    @meJoKeR65 5 лет назад +57

    gotta love Paul's reactions to his intentional mistakes

    • @jaytalbot1146
      @jaytalbot1146 4 года назад +1

      Well, it might be cute the first time, but it gets old pretty quick, considering that had just watched tutorial 18 before this one. I realize that at the time video was posted it had been five days since #18, not 5 minutes, but still....
      At 5:54 "I believe that will work", well I don't!
      At 5:57 "so then what do we want to do?" We want to put a semicolon at the end of that previous line !!!
      At 7:02 I started breathing really fast, and sure enough you got an error 🤣🤣🤣
      Also, you did the same Serial.print when you really wanted Serial.println in the last video too, and... yep, you did the pin mode this last time too, now I understand some things bear repeating, but at tutorial #19 some of the really basic stuff might have already been covered adequately.
      Or if they are trying to screw with you they might type "bLuE", with the limited choice of the three colors one might just look at the fist letter then one only need to check for 'b','B', 'r','R', 'g','G' that would also work if user shortened their response to R, G or B. the first letter might also work if the answer was given in some other languages
      Or, since there is a built in function for it, one might also just convert the string to upper (or lower) case then a singe test per color would work
      Since it is lesson 19, one might have considers switch...case instead of a series of ifs, then in default: one could print a message saying response was not understood

    • @midnightrizer
      @midnightrizer 3 года назад

      @@jaytalbot1146 i agree :)

    • @RDayan932
      @RDayan932 3 года назад

      @@jaytalbot1146 Even though I agree, I feel like for a total newbie who has ZERO experience coding, those repeated errors are very helpful.

    • @royeubanks639
      @royeubanks639 3 года назад +2

      "intentional" right ;) Like Inspector Clouseau: "I was just testing you"

    • @tedparker640
      @tedparker640 3 года назад

      I have the sneaking suspicion that although he does intentionally make mistakes (like using an intiger in the LOOP) he immeidatly corrects himself. When he makes a mistake that wasn't intentional, he plays it off as if he intended to make the mistake so we would call him on it... but that doesn't work on a video...
      For example, when he was doing the area of a circle code, he mispelled "circle" as "circe" and never caught it no matter how loudly I yelled to point out the mistake.
      That being said, we are all human and make mistakes, but the intentional ones are getting a little... annoying.

  • @ianrickard9480
    @ianrickard9480 2 года назад +1

    Loved this one, and it's finally starting to stick in my mind. I performed the coding slightly different to the way you did it and incorporated the previous example shown:
    String myInput;
    String msg="What is your Name? ";
    String msg2="Hello ";
    String msg3=", which LED would you like to illuminate?";
    int rPin=8;
    int yPin=9;
    int bPin=10;
    int delayT=2500;
    void setup() {
    // put your setup code here, to run once:
    Serial.begin(9600);
    pinMode(rPin,OUTPUT);
    pinMode(yPin,OUTPUT);
    pinMode(bPin,OUTPUT);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    Serial.println(msg);
    while (Serial.available()==0){

    }
    myInput=Serial.readString();
    Serial.print(msg2);
    Serial.print(myInput);
    Serial.println(msg3);
    while (Serial.available()==0){

    }
    myInput=Serial.readString();
    if (myInput=="red" || myInput=="Red" || myInput=="RED"){
    digitalWrite(rPin,HIGH);
    delay(delayT);
    digitalWrite(rPin,LOW);
    delay(delayT);
    }
    if (myInput=="yellow" || myInput=="Yellow" || myInput=="YELLOW"){
    digitalWrite(yPin,HIGH);
    delay(delayT);
    digitalWrite(yPin,LOW);
    delay(delayT);
    }
    if (myInput=="blue" || myInput=="Blue" || myInput=="BLUE"){
    digitalWrite(bPin,HIGH);
    delay(delayT);
    digitalWrite(bPin,LOW);
    delay(delayT);
    }
    if (myInput=="all" || myInput=="All" || myInput=="ALL"){
    digitalWrite(rPin,HIGH);
    digitalWrite(yPin,HIGH);
    digitalWrite(bPin,HIGH);
    delay(delayT);
    digitalWrite(rPin,LOW);
    digitalWrite(yPin,LOW);
    digitalWrite(bPin,LOW);
    delay(delayT);
    }
    }

  • @saeidr.hirbodi9927
    @saeidr.hirbodi9927 5 лет назад +3

    Hello Paul, I am really enjoying your video's, thanks. I am drinking my coffee, just coffee, lots of ice, no sugar or cream, as you have ordered. I am watching all you video's and I am up to 18 tonight. Retiring on October 1 and plan to start my real work. So far I am really enjoying and learning, thanks for all your hard work. Much appreciated.
    Regards,

  • @SukhdevSingh-tp4mg
    @SukhdevSingh-tp4mg 4 года назад +2

    Seriously better than any costly course , just free knowledge

  • @robjameson7965
    @robjameson7965 4 года назад +4

    Hi Paul,
    Just writing from Liverpool in England.
    First time I've ever bothered subscribing to a RUclips channel. I think the videos (content, format & pace) are excellent, your teaching-style definitely shows your professionalism & teaching/ learning psychology experience. I'm currently working through the 'New' Arduino series & intend to go back to the old series, as well as the IMO and Arduino Python. Then the NVIDIA. I like the repetition, re-capping, focus on a single teaching point, with the relevant links, etc.Only issue is its sometime hard to hold your breath when you laughing!A big 'thank-you' & back to your videos!

  • @max_dee
    @max_dee 2 года назад

    Great lesson again thanks Paul.
    I practice by having a crack at it purely from memory (fail). Then I go back to previous lessons and check the syntax of the IF statement (still fail!). Then I check your solution and work my way through it with you - SUCCESS!
    Initially I missed the '=='.
    Then I had placed the 'Serial.readString' BEFORE each if statement (fail!).
    I amended (complicated!) my procedure a little by combining two different read statements:
    1. asked what is your name?
    2. used that string in another sentence and asked 'name' to choose which LED they wanted ON.
    3. Turned that LED on, then gave them a confirmation message with the LED they had chosen in the final msg.
    4. wrote a delay then turned ALL LED's OFF.
    Love your work thanks!

  • @karll.masoner6918
    @karll.masoner6918 5 лет назад +13

    This is how I chose to do the sketch in the lesson. I have found that you need to make user interface as simple and fool proof as possible. I try to provide a menu with single characters for selections, preferably ones which are less likely to have a choice between upper and lower case.
    //Establish your variables
    int redPin=9;
    int greenPin=6;
    int bluePin=3;
    int colorPick=0;
    int (dt)=500; //added a delay time just to make it easier to see errors
    //We need to control the user inputs, so we give the user as much
    //information as they need. I chose to have the user enter integers
    //because they are less likely to mistype them. Strings are best used
    //for giving instructions. Numbers are better for gathering inputs
    //where the user must type something. The statements below tell the
    //user how to enter the data and what range is acceptable. I also
    //have provided for an out of range response.
    String msg="Which LED should we light? Type:";
    String msg2="1 for Red.";
    String msg3="2 for Green.";
    String msg4="3 for Blue.";
    String msg5="0 for Off.";
    String msg6="Your choice is out of range. Pick again.";
    void setup() {
    Serial.begin(9600); //Turn on the serial monitor
    pinMode(redPin,OUTPUT); //Setting the pin modes
    pinMode(greenPin,OUTPUT);
    pinMode(bluePin,OUTPUT);
    digitalWrite(redPin,HIGH); //Testing the circuit to be sure
    delay (dt); //no components have been jarred loose
    digitalWrite(greenPin,HIGH);//from the board or Arduino
    delay(dt);
    digitalWrite(bluePin,HIGH);
    delay(dt);
    digitalWrite(redPin,LOW);
    digitalWrite(greenPin,LOW);
    digitalWrite(bluePin,LOW);
    }
    void loop() {
    Serial.println(msg); //Ask the user to make a choice of LED
    Serial.println(msg5); //Explain the options available and
    Serial.println(msg2); //how to enter the choice, i.e. "1 for blue"
    Serial.println(msg3);
    Serial.println(msg4);
    //Wait for the user to understand the instructions and make a selection
    while(Serial.available()==0){
    }
    colorPick=Serial.parseInt(); //Set the variable colorPick to their input
    Serial.println(colorPick); //Print their input (for troubleshooting)
    //Here we are using if statements to define the action to be taken
    //for each possible choice made by the user. Note they also have
    //the option to turn off the previously selected LED without turning
    //on another LED.
    if(colorPick==0){
    digitalWrite(redPin,LOW);
    digitalWrite(greenPin,LOW);
    digitalWrite(bluePin,LOW);
    }
    if(colorPick==1){
    digitalWrite(redPin,HIGH);
    digitalWrite(greenPin,LOW);
    digitalWrite(bluePin,LOW);
    }
    if(colorPick==2){
    digitalWrite(greenPin,HIGH);
    digitalWrite(redPin,LOW);
    digitalWrite(bluePin,LOW);
    }
    if(colorPick==3){
    digitalWrite(bluePin,HIGH);
    digitalWrite(redPin,LOW);
    digitalWrite(greenPin,LOW);
    }
    //Here we are taking into account that some users may have issues
    //with authority or just can't seem to hit the correct key.
    //If their entry does not correspond to an allowable option
    //they will be advised in the serial monitor that they have made
    //a mistake and all LED's will flash on for half a second.
    if(colorPick3){
    Serial.println(msg6);
    digitalWrite(redPin,HIGH);
    digitalWrite(greenPin,HIGH);
    digitalWrite(bluePin,HIGH);
    delay(dt);
    digitalWrite(redPin,LOW);
    digitalWrite(greenPin,LOW);
    digitalWrite(bluePin,LOW);
    delay(dt);
    }
    }

    • @okann_hasan
      @okann_hasan 2 года назад +2

      The point of this was learning to use strings

    • @marcelomarquesrangel
      @marcelomarquesrangel 2 года назад

      Your observation makes a lot of sense, so I tried to keep the interface simple, but using strings. That's what my code looks like.
      int redLEDpin=D7;
      int greenLEDpin=D6;
      int blueLEDpin=D5;
      String colorLED;
      String msg1= "Which color LED do you want? Type 'red', 'green' or 'blue'.";
      String msg2= "You picked '";
      String msg3= "'. ";
      String msg4= "Now look at the LED on the breadboard.";
      String msg5= "Unfortunately, that is not a valid color.";
      void setup(){
      Serial.begin(9600);
      pinMode(redLEDpin,OUTPUT);
      pinMode(greenLEDpin,OUTPUT);
      pinMode(blueLEDpin,OUTPUT);
      }
      void loop() {
      Serial.println(msg1);
      while(Serial.available()==0){
      }
      colorLED=Serial.readString();
      colorLED.toUpperCase();
      Serial.print(msg2);
      Serial.print(colorLED);
      Serial.print(msg3);
      Serial.println(msg4);
      if(colorLED== "RED") {
      digitalWrite(redLEDpin,HIGH);
      digitalWrite(greenLEDpin,LOW);
      digitalWrite(blueLEDpin,LOW);
      Serial.println();
      }
      if(colorLED=="GREEN") {
      digitalWrite(redLEDpin,LOW);
      digitalWrite(greenLEDpin,HIGH);
      digitalWrite(blueLEDpin,LOW);
      Serial.println();
      }
      if(colorLED=="BLUE") {
      digitalWrite(redLEDpin,LOW);
      digitalWrite(greenLEDpin,LOW);
      digitalWrite(blueLEDpin,HIGH);
      Serial.println();
      }
      if(colorLED!="RED" && colorLED!="GREEN" && colorLED!="BLUE") {
      digitalWrite(redLEDpin,LOW);
      digitalWrite(greenLEDpin,LOW);
      digitalWrite(blueLEDpin,LOW);
      Serial.println(msg5);
      Serial.println();
      }
      }

  • @raymondjonkers104
    @raymondjonkers104 3 года назад

    I've been in IT since 1974. I have coded and given trainings in several IBM mainframe languages, including S/370 Assembler. Went into Sales in 1983, than into management and been CEO of several companies. It's a real pleasure to get into controlling electronic circuits via Arduino and it's IDE. Paul is a very good teacher, I know the effort that goes into this teaching. Bravo !

    • @douglasmckinley-sr1507
      @douglasmckinley-sr1507 3 года назад

      Sounds like a similar career path (COBOL, FORTRAN, PL/1,BAL,RPG,GPSS,HASP, RJE, JCL ) and went into sales in 1979, then management and co-founding some startups, etc. Oh the fond memories of BALR 14,15 and not so fond memories of the dreaded abend SB37.

  • @geralddrake4617
    @geralddrake4617 4 года назад +3

    Just for fun, added another variable “all” to turn all LED’s on. It worked. Thanks for this lesson. “If” statements are great programing tools.

    • @muhammadtamim451
      @muhammadtamim451 3 года назад +1

      After seeing this comment, I felt jealous and I tried it, and it worked. LOL

  • @grathado28
    @grathado28 2 года назад

    I think one of the reasons why your videos are so popular because it shows us that even the best of us have errors and you show the process of correcting it.

  • @D3M0320
    @D3M0320 4 года назад +17

    These tutorials are fantastic and make me WANT to learn more!

  • @bonesharmon917
    @bonesharmon917 4 года назад

    Hi Paul
    I'm usually shy about comments/Internet but I was passing through comments anyway, in search of the "No Line Ending" fix for the Serial Monitor. I had finished this lesson and lesson 20 (in case I simply coded improperly during 19). Thankfully, I found the fix quickly.
    So here I am after 20 lessons and I'm compelled to leave you this message:
    you are fantastic. You are a part of my daily life to the extent I will say things to my wife, like "gotta get back to Mr. McWhorter's class." You seem interested in who/what your viewers are/doing - and I'll keep this short - so here are just a few bullet points.
    I'm 51. Married. Started all this to generate interest for teenage child. I immediately assumed you were a teacher. I'm actually married to a teacher. More interestingly: after lessons and while paused I usually tweak the code to include more and different things, as I have wrapped my head around them, due to your "class." Sometimes I feel like I am the "teacher's pet" and other times I feel like I am the class smart-guy. Most importantly I believe my "feels" are a testament to how wonderful and personal your videos are.
    Please keep going. I'll be watching and learning. Thank you for the incredible gift that is The Arduino Tutorials.
    PS
    is that really coffee in your mug? Just kidding.
    When I'm not learning to code, I'm all about the coffee here at home. From pumping Espresso to French Press to Cold Brew and everything in between. I'm fortunate in that I live close to a local roaster with beans from around the world and sometimes I wonder if you've had any first-hand interactions with beans/farmers.
    Anyway, thank you, again!

    • @paulmcwhorter
      @paulmcwhorter  4 года назад

      Thank you for your kind words, they are a real encouragement to me.

  • @fizamaqbool13
    @fizamaqbool13 3 года назад +3

    These assignments are so much fun, and it makes me so happy every time I get the output before watching the video! Thank you for these!!

  • @GailarX
    @GailarX 2 месяца назад

    I stopped the video, did the work alone and it worked. That was exciting. You're the best Master Paul

  • @CodeRed503
    @CodeRed503 4 года назад +5

    Forgot the ==. Lot of fun going through it trying to find out how I messed up and learning from it.

  • @sierkdejongh8984
    @sierkdejongh8984 Год назад +1

    Paul,
    I only found your channel a few days ago. I have been working with Arduino's, but mostly programmed in C++ bij someone else. Your examples are clear, I can't make out when you make a real typo and when you put it in on purpose.
    My only comment at this stage (lesson 19) is that the breadboard does not have a ground rail for nothing. In example 19 the wiring becomes much clear is you put the short legs of the LED's directly in the ground rail and the only use one ground wire,
    Another thing: if you want the breadbord and the print to always be parallel, why not fix them to a piece of MDF with a few small screws or double sided tape.
    Regards, Sierk from the Netherlands

  • @erygion
    @erygion 4 года назад +6

    This was fun 😊 and it's not me I always hold my breath. Great lesson, I learned some new tricks. Thank you Mr. McWhorter.

  • @zudzifudushzy
    @zudzifudushzy 2 года назад

    Thanks a lot for that great lesson!
    I really liked your assigment and did it a little bit different, for example I set all 3 LEDs to LOW right after the wait loop and than only set the on LED to high that the user submitted. I also made an error message if the user submitted anything else than red, green or blue in lowercase.
    For those who are interested, here is my code:
    int rLED = 12;
    int gLED = 10;
    int bLED = 8;
    int dt = 200;
    String onLED;
    String msg = "What color do you like? You can choose from red, green and blue.";
    String msg2 = "The ";
    String msg3 = ", LED is now powered on!";
    String msg4 = "Error! You can only choose from red, green and blue. Keep in mind that your input is case sensitive!";
    void setup() {
    // put your setup code here, to run once:
    Serial.begin(9600);
    pinMode(rLED, OUTPUT);
    pinMode(gLED, OUTPUT);
    pinMode(bLED, OUTPUT);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    Serial.println(msg);
    while (Serial.available() == 0) {
    }
    digitalWrite(rLED, LOW);
    digitalWrite(gLED, LOW);
    digitalWrite(bLED, LOW);
    onLED = Serial.readString();
    if (onLED == "red") {
    digitalWrite(rLED, HIGH);
    Serial.print(msg2);
    Serial.print(onLED);
    Serial.println(msg3);
    }
    else if (onLED == "green") {
    digitalWrite(gLED, HIGH);
    Serial.print(msg2);
    Serial.print(onLED);
    Serial.println(msg3);
    }
    else if (onLED == "blue") {
    digitalWrite(bLED, HIGH);
    Serial.print(msg2);
    Serial.print(onLED);
    Serial.println(msg3);
    }
    else {
    Serial.println(msg4);
    digitalWrite(rLED, HIGH);
    digitalWrite(gLED, HIGH);
    digitalWrite(bLED, HIGH);
    delay(dt);
    digitalWrite(rLED, LOW);
    digitalWrite(gLED, LOW);
    digitalWrite(bLED, LOW);
    delay(dt);
    digitalWrite(rLED, HIGH);
    digitalWrite(gLED, HIGH);
    digitalWrite(bLED, HIGH);
    delay(dt);
    digitalWrite(rLED, LOW);
    digitalWrite(gLED, LOW);
    digitalWrite(bLED, LOW);
    }
    }

  • @opalprestonshirley1700
    @opalprestonshirley1700 5 лет назад +4

    Another enjoyable video Paul. Lessons are getting more fun having more control from the keyboard.

  • @joevaclavik4427
    @joevaclavik4427 Год назад

    Did some head scratching for a few minutes. I am learning so much and just want to thank you. Some people have ability to code and etc. however they cannot teach. I love the way that you simplify things for all to understand. Thank you Paul

  • @daveharkin4731
    @daveharkin4731 5 лет назад +3

    Thank you very much for these tutorials, I've been following along and found you to be an excellent teacher. Please keep these excellent tutorials coming

  • @MrZodiacmark
    @MrZodiacmark 11 месяцев назад

    Hello Paul,
    Your channel is the first one that I have subscribed to, I am an Electrician from London, England with a bias toward control Engineering. When I watched your first video on the Arduino I thought that you was taking a while to explain things, but going through the different episodes your in depth explanations are the right way to teach.
    Thank You for sharing your knowledge
    Stuart Hill
    London, England

  • @louandpaulanickles7172
    @louandpaulanickles7172 4 года назад +4

    Thanks Paul! Really enjoying your series of tutorials. One question though: I'm just wondering why you are not setting up your wiring using the same column for resistor and LED, then using a common (-) to plug all the LED's into. I've found it much easier to just jump the resistor across the trench and plug the LED into the numbered column and the common (-) row.

    • @siamaknaimi8416
      @siamaknaimi8416 2 года назад

      I think when using green and blue they have different voltage drop.

  • @lesterrios9825
    @lesterrios9825 2 года назад

    Spent more than one hour troubleshooting for this lesson. If I didn’t read the description in this video I would have spent another one hour.
    “No line ending.” Please set your serial monitor guysss.
    After that you can hold your breath and say ,”BOOOM it works!”

  • @ha13151
    @ha13151 5 лет назад +30

    "BooM"

  • @autocrosser10
    @autocrosser10 Год назад +1

    Paul, Another great lesson! I was barking at my screen during lesson 18 and 19 because you didn't do a pinMode! I wasn't expecting the LED to come on. Was very surprised when came on and was dim.

  • @believer3759
    @believer3759 4 года назад +2

    Hi everyone! Thanks Paul for teaching an old dog some new tricks!!! Until this one I was doing very well but this time it took several hours for me to figure out the serial monitor setting had to be changed to 'no line ending' before it would work. I was so sure it was my coding. Thank goodness a poster mentioned it here. Thanks and keep doing what you do!!! God bless!! :D

    • @Jaso2779
      @Jaso2779 4 года назад

      What would happen if it wasn't changed? I'm having an issue where it asks what color then when I enter a color nothing comes on

  • @Aniven79
    @Aniven79 3 года назад

    Didn`t read the part about setting the serialMonitor to "No line ending". Was going absolutely nuts trying to figure out what was wrong,lol. Rewrote the whole thing a few times until i finally saw the comments. My board almost went flying out the window here hahaha.
    Another great video Mr.Worther. thank you for your dedication :)

  • @grafophone
    @grafophone 3 года назад +1

    I couln't make the exercise asked at begining. But during the lecture I came to a point where I was able to complete well the program by adding ; "Your Led Color is" then "red,green, or blue"; add also a 3 second delay to put led LOW at the end of cycle. Stuff is getting to comprehension to me. Thank you Paul.

  • @stewarthartley7613
    @stewarthartley7613 2 года назад +1

    I struggled for hours to get mine to work . Then I read the comment make sure you have 'no line ending' in the serial monitor box. Then BOOM it worked. Thanks InvisibleHero. Thanks too Paul. great Series.

    • @prathamsaboo5190
      @prathamsaboo5190 2 года назад

      Was almost going to give up in frustration. Thank You buddy.

    • @khevsu6139
      @khevsu6139 6 месяцев назад

      thank you so much,this comment is lifesaver

  • @leocallejas
    @leocallejas 3 года назад +2

    This one I couldn't get working on the first try. My reasoning was correct, but I made two mistakes in the code.
    The first mistake was not using == inside the If statement. I ended up googling about If statements as a refresher and there I saw the error.
    The second mistake was that I did think about including the capitalized version of the color, but I wrote it < if(color=="red" || "Red") > and it did not work like this. This I couldn't figure out until I saw the rest of the video. All in all, a super fun lesson.

  • @michaelcostello6991
    @michaelcostello6991 4 года назад +1

    I like that we stick to the basic code for these examples so we fully comprehend what is being taught. Using extra functions that convert to lower case etc is best left for later just like you are doing to avoid confusion. Thanks

  • @larrygohl2816
    @larrygohl2816 4 года назад +1

    This is a Great tutorial on using Arduino for a beginner like my self. Only one thing I miss in your tutorial was on COM PORT setting. Got the port setup on the right USB, and the right Baud Rate of 9600 , but I did find out that the line feed has to be in "no line ending" to work correctly. That little set back made me go thru my program looking for my error in code . Looking for all the info i could find on WHILE statement thinking i had something wrong. It was my son that saw my mistake and showed me how to fix it. SO FOR YOU BEGINNER MAKE SURE YOU ARE ON "no line ending" IN YOUR COM PORT,

    • @LarrysTrainingLLC
      @LarrysTrainingLLC Год назад

      I had the hardest time getting this to work...i started and stopped the video more times than I can remember...I changed the values to match his exactly. I started looking into the comments and found this. I changed that setting and it worked immediately. THANK YOU for posting this. I was going absolutely nuts trying to get this working.

  • @dennisrice456
    @dennisrice456 Год назад

    Prof McWhorter,
    Forgot to add that your presentations are excellent. I am a former college professor and you provide an excellent presentation.

  • @stilesmcgraw
    @stilesmcgraw 3 года назад +1

    I paused the video and did the circuit work without a hitch, did the pinMode setups but had a hard time trying to figure out how to get just ONE LED to come on at a time. I finally gave up and followed your program. Such an awesome class! This one was very cool! And just think...they are just going to get cooler as we go along!

  • @flinn_pic
    @flinn_pic 4 месяца назад +2

    I always thank God for bringing your videos to my intention I pray you that you continue enlightening us upcoming engineers

  • @Kyldrake
    @Kyldrake 3 года назад +1

    What do you know, I spent the whole day coding with Paul. Time flies when you're having fun.

  • @pasteltiara
    @pasteltiara 4 года назад

    The trademark "BOOOM" always liven up the lessons. No one will unsubscribe you. I will stay with the lessons, all of them. I now carry a small box and cable around and practice the lessons in fast food places, using my mobile phone version of IDE. Many thanks Paul Sir.

  • @squeakal3393
    @squeakal3393 4 года назад +2

    I used the toUpperCase() function and then just tested the string against it's uppercase value in the if statement. Also set a flag if the colour choice was a valid entry and tested it at the end of the code which displayed an error message if red, green or blue had not been entered and of course reset it after the error message. I found this tutorial very useful as a step in the right direction to controlling actions through the Arduino IDE. Thanks for your efforts Paul.

  • @audreyflores243
    @audreyflores243 5 месяцев назад

    Still here and enjoying all the tutorials. So motivated, I bought an Arduino R4. As always, thank you so much.

  • @mylittlepony9557
    @mylittlepony9557 10 месяцев назад

    Hello, Paul! For the 3 LEDs light up, I initial used 3 "while" loops instead of 3 "if" loops. It ended my program would not loop back. It only asked the question once and then lighted the LED up accordingly, and no more actions afterwards. After watching your solution, I changed all three "while" words to "if" words. It looped back ☺. Now I think I gained better understanding the differences between "if" and "while". Thank you!

  • @CalebJahnke
    @CalebJahnke 4 года назад

    I've noticed this 19 lessons in. I've been following your instructions almost exactly. The main difference is that I use my own variable names. The thing I noticed is that it makes me think a little more and sort of forces me to troubleshoot on my own without just looking at your code and copying it exactly. I tried looking back and forth and thinking "Okay, so I used this name instead of the name he used, so I should find every time he wrote his and match it up with mine and make sure it follows." That was difficult going back and forth and back and forth like that. Having my own variable names forced me to think for myself and try to find out where I went wrong with something. I think that'd be a great thing to suggest in your videos so people can try to think on their own.

  • @ComputerWizards-o4w
    @ComputerWizards-o4w Год назад

    When I did the assignment, I added an if statement that on any misspelling or capitalization an error message would be generated asking the user to try again. I'm 73 and learning Arduino coding through your videos. Many thanks.

  • @daniellehwing4667
    @daniellehwing4667 10 месяцев назад +2

    I even put an || with RED, GREEN and BLUE!!
    Great class!

  • @davidquichocho1351
    @davidquichocho1351 4 года назад +1

    I was stuck on this for a while. I even had to take a break from this lesson. It really helps that you dont put ";" after the if condition.Thank goodness I found this. Thanks for the lessons!

    • @dpetervan
      @dpetervan 3 года назад

      Ha!!....I did the same darn thing! Feels great when one finally figures it out!

  • @ysstudio3902
    @ysstudio3902 6 месяцев назад

    Thank you Sir, I am a 13 year old Student from Punjab (India) and love watching your videos as they teach a lot about Arduino boards as I always wanted to learn to use them.

  • @TheKverbeeck
    @TheKverbeeck 4 года назад

    Thx for another great lesson and assignment Paul. Here is how i did it, i used if, else if and else instead.
    int redLED = 10;
    int greenLED = 11;
    int blueLED = 12; //LED 13 operates together with internal LED and shows strange behavior
    String msg = "What color LED would you like me to turn on? ";
    String msg2 = "Options are 'red', 'green, blue or all: ";
    String msg3 = " is turned on !!!";
    String msg4 = "Not a valid color";
    String ledColor;
    String red = "red";
    String green = "green";
    String blue = "blue";
    String all = "all";
    void setup() {
    // put your setup code here, to run once:
    pinMode(redLED, OUTPUT);
    pinMode(greenLED, OUTPUT);
    pinMode(blueLED, OUTPUT);
    Serial.begin(9600);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    Serial.println(msg);
    Serial.println(msg2);
    while (Serial.available() == 0) {
    }
    ledColor = Serial.readString();
    if (ledColor == red) {
    digitalWrite(redLED, HIGH);
    digitalWrite(greenLED, LOW);
    digitalWrite(blueLED, LOW);
    Serial.println(ledColor + msg3);
    }
    else if (ledColor == green) { // if would also work !!!
    digitalWrite(redLED, LOW);
    digitalWrite(greenLED, HIGH);
    digitalWrite(blueLED, LOW);
    Serial.println(ledColor + msg3);
    }
    else if (ledColor == blue) { // if would also work !!!
    digitalWrite(redLED, LOW);
    digitalWrite(greenLED, LOW);
    digitalWrite(blueLED, HIGH);
    Serial.println(ledColor + msg3);
    }
    else if (ledColor == all) { // if would also work !!!
    digitalWrite(redLED, HIGH);
    digitalWrite(greenLED, HIGH);
    digitalWrite(blueLED, HIGH);
    Serial.println(ledColor + msg3);
    }
    else {
    Serial.println(msg4);
    }
    }

  • @anthonyj.dipasqua4676
    @anthonyj.dipasqua4676 4 года назад +2

    So fun to play along. Thanks again for another great lesson! I added some other responses like "You picked GREEN!" as well as a delay for how long the light stayed on. After the light turns off another message that says "You did it! Thanks for playing." I wanted to add further instructions if the CAPS were incorrect and got close but was unable to make it work correctly. I'm sure we will cover this in the future. Good luck everyone!

    • @mileshester6939
      @mileshester6939 2 года назад

      Mine says, "You selected: " and then myColor. I was troubleshooting the problem that was corrected with the selection for No line ending. Still, my adding the extra 2 lines of code told me my problem was not with the while line.

  • @ReDoG129
    @ReDoG129 17 дней назад

    I'm glad you explained how the breadboard works. I use one ground just by connecting the negative rail. That way I use one ground on the Arduino and hook all the LEDs to the negative rail.

  • @Codablaze
    @Codablaze 2 года назад

    Additionally, as a former events technician who has trained up and coming techs, I think your attitude to mistakes is fantastic. Making mistakes happens most days, and it's so important to just be comfortable to go 'whoops, that was my fault.'

  • @dimpledharamsi7704
    @dimpledharamsi7704 2 года назад

    I really appreciate your teaching. I was not getting the desired output until I checked the comments and the video caption. I appreciate the way you try to solve our doubts . We are blessed to have a great teacher like you! Thank you!😄

  • @slogan5466
    @slogan5466 4 года назад +1

    If I had teacher like you in my school days, I 'might' have become an engineer! I am amazed at the clarity of your teaching, humanity and most of all your generosity. I am following your Arduino lessons, now at lesson 19. I can not say that I can repeat what I learned yet, but I will get there.
    I have an idea about aviation security programming that I would like to run by you, it has the potential to save numerous lives. Please contact me.

  • @davidamadeo
    @davidamadeo 4 года назад +1

    Very nice tutorials Paul. Have been following this tutorial for a few days now and will be following till the end. A year after this was uploaded and still I find this very helpful. Thank you so much for your time and effort! Love them all. We need more people like you. Thanks a lot once agian!

  • @RahulMishra-ov4nr
    @RahulMishra-ov4nr 3 года назад

    I did the assignment a little differently, in my program instead of just turning LEDs on, it blinked the LEDs 5 times, I used a for statement inside each if statement for blink the LEDs. And yes, I did not forget to use variables. Great videos keep up the good work sir.

  • @Bristoll170
    @Bristoll170 4 года назад +1

    I set my LED's up so that the GND legs are all in the outside bus. That way only one GND wire is needed. Makes it a lot easier and neater. Thanks for the BRILLIANT tutorial.

  • @barryhibben8665
    @barryhibben8665 8 месяцев назад +1

    Another instructive tutorial Paul, keep up the great work. As mentioned earlier I'"chucked in the towel" at my last attempt, but I think I may be past the "towel chucking" stage now
    All down to you mate!!!

  • @460tahiti
    @460tahiti 3 года назад

    The IF statement kept changing the "myColor" after about a half an hour I remembered to put == and not=. It was quite challenging. It worked perfect after the correction. Thank you Paul.

  • @lukasmassier4824
    @lukasmassier4824 3 года назад +1

    Paul, I have not seen all of your videos and maybe you have figured this out between the time of posting and now, but if you need to change one word, such as HIGH to LOW, you can double click on that word to highlight it. Makes the copy paste go a bit faster. You can then copy LOW and quickly paste it everywhere the change is needed...etc. Thanks again for your lessons!!!!!

  • @octogintillion
    @octogintillion Год назад +1

    This was a fun challenge! I loved figuring out myself how to send a message if the input command was in the wrong format, and adding a secret command to turn on all three LEDs. Love the series!

    • @samueltheprogrammer6145
      @samueltheprogrammer6145 Год назад

      I love it too, it is not only good for sending and receiving data but it is good for debugging, which is a really useful thing.
      Samuel

  • @richardbritain7435
    @richardbritain7435 2 года назад

    Success!! I did it. Slightly different but same result. I used options 1 to 3, to avoid typing issues.

  • @sse8033
    @sse8033 4 года назад

    I never feel boring while listening to you. I have learned a lot. I understood things well because of your style. Thank you so much.

  • @franciscoserafim7793
    @franciscoserafim7793 2 года назад

    I found this tutorials some days ago and i´m already in tutorial 19. I feel so pleased. Thank you Mr McWhorter.

  • @aaronmilliman7685
    @aaronmilliman7685 2 года назад

    Thank you, I'm slowly seeing how we can use these in different setups. For example I could turn "blue" to "Lamp" and just plug in a lamp to the setup. It's great seeing this little board come to life.

  • @blazehawkins2759
    @blazehawkins2759 3 года назад +1

    This has been a great way to unify all the stuff we've been learning up till now. When I originally started trying to solve this, I wanted to turn myColor into an int, and then have the user select a number instead of typing in a word because I was worried about what would happen if they didn't type in the word exactly as expected.
    I'm definitely finding a great deal of value in this tutorial series, and can't wait to find out how to create an exception for when people don't use the exact command properly.

  • @neillaw2121
    @neillaw2121 2 года назад

    Like many of the other commentators, I paused the video, did the project, and it failed. I watched the remainder of the video, your code was identical to the code I wrote, (except for the British spelling of Colour). Still failed.
    Watched the video through your web portal and of cousre, there are comments on display there. So now I know. The Serial Monitor has a number of sttings in drop down menus at the bottom of the window. Select No line ending. And "boom", it now works.
    So 19 down 49 to go.
    A great learning resource Paul, thank you. 17 Aug 2022

  • @rainball4085
    @rainball4085 4 года назад +2

    To simplify the wiring to ground, we can (1) plug three leds' short legs into the long row of the breadboard, and (2) connect the breadboard's long row to the GND of the circuit board.

  • @dr.danielkester9313
    @dr.danielkester9313 Год назад +1

    It works! It took me 3 days but I got it. I could use a refresher on those darn () and {}!

  • @nicolasprevost3797
    @nicolasprevost3797 4 года назад

    I have added in my programming clauses to turn off the LEDs and an Error msg if wrong colors or text is inputted by the user. I am new to programming and arduino's. These courses are very interesting. I have followed them since course 1 and will continue on. Thank you Mr. McWorther.

  • @rayhagan1339
    @rayhagan1339 4 года назад

    This was driving me crazy. It seemed like none of my digitalWrites were working. Checked the circuits and with 5v to each resistor and the LED worked! But the digital output wasn't there. Tried everything I could think of, but nothing worked
    Then, I saw the "No line ending" phrase appearing in the comments. Changed that and "BOOM," it works!
    Was this in a lesson and I missed it? Oh, well. I'm enjoying this course tremendously. One thing I've learned is to minimize wires by using the rail busses. I find that more convenient, personally.
    Keep up the good work, Paul. I'm on lesson 24 and having a ball. I teach power plant operations and plant simulator training which includes a lot of electrical theory and digital controls. I appreciate your teaching style and your expertise. Also, plan to make some videos, using the Arduino, to help teach basic electricity and controls. Again, great job. Looking forward to future lessons.

  • @madskillz98258
    @madskillz98258 3 года назад +1

    This is a good one! I added a portion that tells the person if it's not one of the expected strings and loops back to enter a color again.

  • @Abdulrahman_Hi
    @Abdulrahman_Hi 2 года назад

    I added another interactive input asking for the number of blinks you want (for the selected LED color).
    You can copy and paste Paul's if statements, and put them in a for loop. Very fun.
    Thanks Paul!

  • @johnnyvegastrading1694
    @johnnyvegastrading1694 11 месяцев назад +1

    Thanks for making these videos. I’m learning so much!

  • @johndavid360
    @johndavid360 4 года назад +1

    I completed the lesson with flying colors! I love this. I made it so you can turn the LEDs on and off, they can be on at all different times, and i can turn them all off/on at one time! 🥰

  • @trumpatier
    @trumpatier 3 года назад

    The assignment was a good brain teaser, thank you! Turns out the mistake I made was not putting quotations around my color variables inside my if statements, leading to blue being constantly lit no matter what color I typed. I also added a message after entering a color that said "Activating (color) LED now!" on a new line :)

  • @Johndoeeeesjs
    @Johndoeeeesjs 2 года назад

    Thank you, Paul! I have learned the importance of reading the description! Spent an hour trying everything i could think of, lol

  • @supernovic99
    @supernovic99 Год назад

    I did the assignment and I loved it. Added a few of my own commands as well. Thank you very much for these videos Mr. McWhorter

  • @waynelupton8102
    @waynelupton8102 3 года назад

    So, I have been following along on my "Smart TV", and had no problems until I got to this exercise. I spent two friggin' days trying to get this code to work, I even set up a test code on all three lights to make sure they blinked before I ran the main bulk of it. On the TV you cant scroll down to see comments so I didn't know about "NO LINE ENDING". It wasn't until day three that I decide to sit outside with my laptop and try and get it to work (which it didn't again), and was going to send my code to Paul to ask what I'd done wrong, when I saw the message. Of course once I set the "no line ending" it worked first time. I would not move on until I made it work. Now on to project 20, yeah!

  • @djohnson4523
    @djohnson4523 Год назад

    Wow, I got it. This was a tough assignment. I took a break to work on other projects, so I had to go back to lesson 12 to remind me how the "if" statement needed to be laid out.

  • @JCork
    @JCork Год назад +1

    I'm 62 and just learning the Arduino. Your tutorials are the best. You explain things very well. Your teaching style is second to none and even when you make mistakes to test me it really helps me to work out the issues. I watch every lesson and faithfully do the assignments and the work along with you. Can't wait until I finish this set and move on to another one of your tutorials - most likely Python. Additionally, there's a teen in my town that wants to be an Engineer and I've given him the link to your channel. FYI I'm in Australia so my purchases go through the Aus store. Any other way to support your excellent work?? Cheers from down under :-)

  • @TheScissorunner
    @TheScissorunner 4 года назад +2

    Paul, really enjoy when you give us projects to try on our own. They help me test my retention of the tutorial and gives me a chance to think about what I've learned. Very beneficial!

  • @AndréSilveira-VA2HAS
    @AndréSilveira-VA2HAS 4 года назад

    In my program, if you choose a color that is not available, it will blink the 3 LEDs 3 times (using a for loop) and then display an error message! I loved this lesson!

  • @garyhart6028
    @garyhart6028 3 года назад

    I couldn't understand why only the green light was coming on, then I realised, I didn't put mycolor (or Colour if you're in the U.K. like me) after the 'OR' statement. now works fine. Thank you again Paul

  • @robbrown1520
    @robbrown1520 Год назад

    The few minutes of coding that weren't on the screen (ep 19) was no a problem as Paul explains it so well anyway!

  • @jonkicker1278
    @jonkicker1278 2 года назад

    I found your videos and started watching them. Thank you for the series. I am an IT professional and found that both the single and double pipe work on Arduino for the "or".