Using Arrays with For Loops

Поділитися
Вставка
  • Опубліковано 10 гру 2024

КОМЕНТАРІ • 50

  • @aaronfidelisrecine
    @aaronfidelisrecine 5 місяців тому +1

    MANNNNNN I've been losing my damn MIND trying to understand for loops and arrays and WOW you make it so easy! THANK YOU!!!!

  • @ChadKapper
    @ChadKapper 2 роки тому +3

    Every video is better than the previous! You do such a good job of helping me discover the value in the details.

  • @warrenstaben6166
    @warrenstaben6166 2 роки тому +7

    Thank you so much. Your videos are so well done and easy to understand!

  • @Cor_Netto
    @Cor_Netto 2 роки тому +3

    Outstanding explanation!

  • @maggotdude667
    @maggotdude667 2 роки тому +2

    You break down information so well! I really appreciate these videos.

    • @programmingelectronics
      @programmingelectronics  2 роки тому +1

      Thanks so much for the note! Much appreciated!
      If there is any info in particular you are looking to learn about, please feel free to let us know and we'll try and make a video on it.

    • @maggotdude667
      @maggotdude667 2 роки тому

      @@programmingelectronicsPerhaps interrupts/timer interrupts?

  • @interlightstudio1645
    @interlightstudio1645 2 роки тому +2

    Been watching your vids since 2019. I Truly like the way you provide information.thank you

  • @KW-ei3pi
    @KW-ei3pi 8 місяців тому

    Thanks! Very good tutorial. You went through the last part pretty quickly, and I couldn't figure out why "now" didn't print on the second and subsequent loops. It wasn't entirely clear that the INDEX values were in memory and could be overwritten by code to a new value. I get it now. Thanks. Regards.

  • @PrUveTGoogl
    @PrUveTGoogl 11 місяців тому

    Вы большой молодец , что делаете такие обучающие видео , спасибо большое !

  • @IngeBall
    @IngeBall 2 роки тому +1

    This is golden (as is the whole series)
    Subbed!

  • @MarkATrombley
    @MarkATrombley 2 роки тому +3

    At 16:30 why is the first line of output messed up? It happened on the other examples too.

    • @programmingelectronics
      @programmingelectronics  2 роки тому +1

      Great question and nice observation Mark! I am sure some out there could explain this (and I would love to know as well), but I _think_ it has to do with the Serial Monitor reseting the Arduino when it is opened.

  • @ianclaproth3675
    @ianclaproth3675 Рік тому +1

    An excellent explanation of how the for loop actually works when iterating arrays. Thank you.

  • @warrenscorner
    @warrenscorner 2 роки тому +5

    That was a great tutorial of a for loop! 😂 Maybe part 2 can explain how to append an array or what types of variables can go into an array.

    • @programmingelectronics
      @programmingelectronics  2 роки тому +1

      Thanks for the note and recommendation Warren! In retrospect I can see this is more a "for loop video" than an "array video"
      We changed up the title and thumbnail to hopefully reflect that better.

  • @thomashvnmusic
    @thomashvnmusic 2 роки тому +2

    This is really good, thanks!!!

    • @programmingelectronics
      @programmingelectronics  2 роки тому

      Thanks a ton for watching! I hope it was helpful!

    • @thomashvnmusic
      @thomashvnmusic 2 роки тому +1

      @@programmingelectronics Im probably one of the oldest fans on the channel. I followed your channel about 8 years now and i remember the first videos you posted when you were drawing and explaining the micro-controller pins on paper. Was a fan back then, still a fan.

    • @michaelcheich2481
      @michaelcheich2481 2 роки тому +1

      @@thomashvnmusic Thanks for sticking around!!!

    • @thomashvnmusic
      @thomashvnmusic 2 роки тому +1

      @@michaelcheich2481 Absolutely!

  • @miroslavmikus6480
    @miroslavmikus6480 2 роки тому

    If you don't need to know index i, you can use range based for loop: for (float val : sensorReadings) { } ; plus with another feature of c++11 "auto": for (auto val : sensorReadings) { Serial.println(val); } - less you have to write mans less bugs you can make

  • @syaduinotech3681
    @syaduinotech3681 2 роки тому +1

    Thanks for the video, hope you can share the application of using this on the sensor as you mention in the beginning. Tq sir

  • @joshuapitong899
    @joshuapitong899 2 роки тому +1

    Really helpful.🙌

  • @RixtronixLAB
    @RixtronixLAB 2 роки тому +1

    Nice info, keep it up,thanks for sharing :)

  • @joroxanborata3102
    @joroxanborata3102 2 роки тому +2

    hi thanks you for the informative about arduino can you make a video to combine 3 sketch that have different doing. like relay lighting , automatic water, and a dht11 sensor

  • @Mica_No
    @Mica_No 2 роки тому +2

    Its so entertaining listen to you

  • @AbrarShaikh2741
    @AbrarShaikh2741 2 роки тому +5

    Thanks for the video. However, it is more lf a FOR loop video then Array Video.

    • @programmingelectronics
      @programmingelectronics  2 роки тому

      You are right! Title adjusted, and I think we'll change out to a more representative thumbnail.
      Thanks @Abrar!

  • @TheStudpop
    @TheStudpop 2 роки тому +3

    Seems to me that i = 0 gets incremented before the next line, so the array’s index will never be 0 but rather 1,2,3.

    • @programmingelectronics
      @programmingelectronics  2 роки тому +3

      I may have not explained it appropriately in the video, but when _entering_ a "for loop", the variable gets initialized and the condition is checked. The increment/decrement happens at the end of the for loop before the next check of the condition.
      1st-> initialize var, check condition
      n...-> increment/decrement, check condition
      Hope this helps clarify!

    • @TheStudpop
      @TheStudpop 2 роки тому +3

      @@programmingelectronics You're the best! Thanks.

    • @LilGh02t
      @LilGh02t 2 роки тому +3

      The '++' operator increments the variable. If it's placed after (i++), the variable will be incremented after the code in the loop is executed, if the operator is placed before the variable (++i), the variable is incremented before entering the loop. Same rules applies to the '- -' operator.

  • @Skyrime007
    @Skyrime007 Рік тому

    How to iterate array with millis() function or iterate through multiple arrays simultaneously

  • @بوزيدأمينأستاذالعلومالفيزياء

    god bless you

  • @j.w.8663
    @j.w.8663 Рік тому

    👍🏻

  • @frankbaron1608
    @frankbaron1608 Рік тому

    hip, hip, array

  • @flywittzbeats4008
    @flywittzbeats4008 Рік тому

    char bestTeachers [][3] = {{“Programming Electronics Academy”}, {“Brocode”}, {“Paul McWhorter”}};