Arduino Workshop - Chapter Three - IF Statements

Sdílet
Vložit
  • čas přidán 4. 09. 2024
  • The full Arduino Workshop in step-by-step format can be found here core-electroni...
    In this section, we'll be looking at using 'If' statements, which are the backbone of decision-making for microcontrollers.
    We're official retailers for Arduino in Australia - powered by makers, for makers! core-electroni...

Komentáře • 42

  • @thesecretworkshoppropstore7914

    Your a life saver! I have been tearing my hair out trying to do this. Now after watching this Eureka!, two weeks of head bashing and brain frying have been put behind me thank you.

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

    Brilliant video and well explained. This example of the IF statement to create a toggle action WITHOUT delays is a fundamental of well executed code writing.

  • @Alakay77
    @Alakay77 Před 3 lety

    This tutorial series is fantastic. Simple, clear and doesn't assume prior coding knowledge. Thank you, you've really helped me get my head around how to do a lot of things and avoid unnecessary headaches!

  • @slingshot360diecastracing6
    @slingshot360diecastracing6 Před 4 lety +29

    If explaining "IF" is the purpose of this video, you've made it way more complicated than necessary. How about a short example first. Then a more complex one later in the video.

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

    This video series is brilliant! Thanks for helping me understand programming the Arduino.

  • @jamesmoon5632
    @jamesmoon5632 Před rokem

    This programme is amazing..very well presented and explained perfectly. Had to sit down and read it loads and practiced writing it a few times but got it. Have altered it to allow four LED’s and a dimmer as well. Thanks

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

    Excellent video. Thank you . I can't understand why you don't have more likes.

  • @andrewcichetti555
    @andrewcichetti555 Před 3 lety

    Thank you for this video series! I find it very helpful, and what you're saying is very easy to follow.
    This example is a little more complicated than one might expect at this level, but if this is the worst video you ever made, you're doing great!

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

    Very informative. But in the last part, while explaining else, you have followed the if directly with else which will cause a compilation error. The else should be put after an if block as follows. if(condition){ // code }else{ // code }.

  • @paulhayden3446
    @paulhayden3446 Před 6 lety +24

    Your videos are very informing but the background music is very annoying and unnecessary.

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

      same

    • @briandowns6263
      @briandowns6263 Před 4 lety

      Dito

    • @williamgantt2470
      @williamgantt2470 Před 4 lety

      This is exactly what I said! The only thing worse is WUMAO and how they censor everything. WUMAO sucks.

  • @elektron2kim666
    @elektron2kim666 Před 28 dny

    I use "once" a lot. Some things can update much more than needed. A piece of code will open by once = 1 and when in it closes by itself with once = 0. Just a tip.

  • @Skopkomut
    @Skopkomut Před 4 lety

    Very cool video. Knowledge behind it is very important bacause this works much better then attempts from other youtubers on button switch code. Thanks

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

    hope you are still active.. currently having problem with toggle switch to control motor using millis. this what i need hope you can help me. when digitalpin is high (always high since toggle switch) thats is the time the millis will start to count till 3hrs to on the motor.

  • @WhoCaresWinsAgain
    @WhoCaresWinsAgain Před 4 lety +7

    Get rid of the background music please!!! I gave up ....

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

    at 16:48 it should have been else if and not if else

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

    I Don't understand why we need to record the last button state. You can do everything as intended without recording the previous button state.
    edit: I also don't see the point in recording the time since the button was last pressed.

  • @gavinclayton9552
    @gavinclayton9552 Před 3 lety

    Hey man,
    really enjoying your videos and learning heaps, - Great job.
    i have a question..... can you have a long unsigned float?

  • @friendforevers
    @friendforevers Před 6 lety

    good work you have much knowledge of ardiuno

  • @Allan-
    @Allan- Před 7 lety +1

    Great Videos.

  • @dannyjensen4954
    @dannyjensen4954 Před 5 lety

    thanks. great video. Excellent.

  • @bubungallery3135
    @bubungallery3135 Před 3 lety

    Arduino can work two stetment at same time

  • @mr.m_photographs
    @mr.m_photographs Před 4 lety

    I still do not understand the first ‘if statement.’ I do not see where we define lastPress besides initializing it as zero. How will this ensure we don’t get ‘bounce feedback.’ Wouldn’t Millis always be greater than the debounce time except for the first twenty milliseconds. Great videos btw. Please help.
    Edit: I got it now, I forgot to set lastPress = Millis in my code. EXCELLENT VIDEOS!!!

    • @Core-Electronics
      @Core-Electronics  Před 4 lety +1

      Great to see you fixed it Matthew. Problem solving is a vital skill that's transferable across programming and life in general.

  • @alejotassile6441
    @alejotassile6441 Před 5 lety

    thanks!

  • @johnsun2416
    @johnsun2416 Před 7 měsíci

    excellence teaching, but could use better camera men.

  • @visual7473
    @visual7473 Před 5 lety

    Hi, I need to compare 4 digital outputs, someone knows how it is done.
    if the 4 are in high state of true .. thanks

  • @sunitapatil381
    @sunitapatil381 Před 6 lety

    nice i like this videos

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

    plzzzz remove thos background musiccccc it really hurts >>>>>>

  • @danishq5430
    @danishq5430 Před 3 lety

    Hey, understanding this is pretty hard for a beginner like me. It feels too complicated

    • @adolfkitler5296
      @adolfkitler5296 Před 3 lety

      Don't worry, at begginer level you have to ignore some stuff

    • @adolfkitler5296
      @adolfkitler5296 Před 3 lety

      But, if you need help I may able to explain it

  • @isoguy.
    @isoguy. Před 5 lety +2

    Great vid but background music adds nothing to the content and discriminates against those of us who do not have perfect hearing e.g. able to differentiate what you are saying against that dreadful background music. I'm sure you dont intend to exclude hard of hearing people from your vids. Thanks for sharing

  • @maryvillegas6553
    @maryvillegas6553 Před rokem +1

    You are crowding too many things at a time. Like mills, state, toggle when you started with how to use if. This leads to a lousy instructor.

  • @PetPeePee
    @PetPeePee Před 5 lety +2

    The F Music kill me

  • @Phantom-mk4kp
    @Phantom-mk4kp Před 5 lety +4

    Also had to stop watching at this point, music doing my head in

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

    Maybe ask your wife about hair.

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

    Damn over Complicated example and confusing. It should have a syntax examples followed by some code examples. Morevover first if is nesting the other two.