Arduino for Beginners: Using Push button to turn ON LED light

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ธ.ค. 2017
  • Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
    This is absolute beginners Arduino tutorial showing how to use push button to turn ON an LED light.
    Download the code:
    robojax.com/learn/arduino/?vid...
    The software used to draw tth diagram is a free program called Fritzing which you can get it from fritzing.org
    Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
    Tutorial by Ahmad Shamshiri form Canada
    ****************************
    Get early access to my videos via Patreon and have your name mentioned at end of very videos I publish on TH-cam here: robojax.com/L/?id=97 (watch until end of this video to list of my Patrons)
    ****************************
    If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
    If you want to learn Arduino from proven instructor on **Udemy**: bit.ly/rj-udemy
    Follow me on Facebook robojaxTV
    Follow me on Twitter: / robojaxtv
    Follow me on Instagram: / robojax
    Tutorial by Robojax.com
    Get other projects code and learn Arduino
    robojax.com/learn/arduino
    #robojax #robojax_push_button
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 40

  • @scottpreston6197
    @scottpreston6197 5 ปีที่แล้ว +1

    Great tutorial! Thanks. I've watched a bunch for leds, buttons, and this one was by far the easiest to follow and provided the best results. I swapped out hard coding pin numbers for variables declared at the beginning (int BUTTON = #; and int LED = #;), but otherwise, followed it exactly and got the intended results.

    • @robojax
      @robojax  5 ปีที่แล้ว

      You are welcome.

  • @asdfg-sx1iv
    @asdfg-sx1iv 17 วันที่ผ่านมา

    thank you very much! you just helped me finished my assignment!

  • @MVP11489
    @MVP11489 5 ปีที่แล้ว +1

    This is extremely helpful! I'm just getting into arduino and you explaining the hardware AND programing is awesome! I'm watching through your other videos now. One question I do have, is how do you determine which resistor to use for the LED? What would happen if you try to run without the resistor, would it fry the LED, or arduino, or even both? Thanks :)

    • @robojax
      @robojax  5 ปีที่แล้ว +1

      You are welcome. I have a video exactly explaining how to calculate resistor value for LED here th-cam.com/video/x2YxfV1L02Y/w-d-xo.html

  • @Greybic
    @Greybic 2 ปีที่แล้ว

    Awesome 👌

  • @jackree7781
    @jackree7781 2 หลายเดือนก่อน

    Tried to add this to an already existing project, but it doesn't seem to work, so I'm probably doing something wrong. So far, I used an ultrasonic sensor and a micro servo to open a door. I'm trying to add this led which lights up when I press a button. When it's lit up, I want a buzzer to make a sound whenever someone tries to open the door, and when it's not lit up, the door opens normally. Problem is: nothing happens to my led.

    • @robojax
      @robojax  2 หลายเดือนก่อน

      when you combine two codes into one, pay attention to pin definition. for example in your first project if pin 3 is used, then when adding second project, you can use the same pin3. use different pin and pay attention toi variables. if you are not getting erro, then it means either pin difination (pinMode(13, INPUT)) have conflect or wrong or wiring is incorrect. Make sure you to test them separately and they work before combining them. good luck

  • @Mannsy83
    @Mannsy83 5 ปีที่แล้ว +2

    hey mate good video but my led is constantly on and the pushing the switch does nothing..any ideas?

    • @robojax
      @robojax  5 ปีที่แล้ว +1

      check your wiring. Make sure you copy the code and past it into arduino. It should work.

    • @Mannsy83
      @Mannsy83 5 ปีที่แล้ว

      Thanks buddy

  • @riteshlama6780
    @riteshlama6780 4 ปีที่แล้ว +1

    Can U tell me how to switch it on automatically with just the program and no manual work required?

    • @robojax
      @robojax  4 ปีที่แล้ว

      so you want the LED to turn ON and OFF?It is called blink. Very simple. On Arduino program click on File->Examples-Basic-Blink and you have that.

  • @vedkaal
    @vedkaal 6 ปีที่แล้ว

    Grt work sir..

    • @robojax
      @robojax  6 ปีที่แล้ว

      Thank you Sir.

  • @filiperpg
    @filiperpg 5 ปีที่แล้ว

    Thank you Sir!

    • @robojax
      @robojax  5 ปีที่แล้ว

      You are welcome.

  • @magmagth4346
    @magmagth4346 ปีที่แล้ว

    Many thanks
    I have a text file stored in sd memory as follows, it consists of three columns
    0'10,0
    10,0,0
    0,0,10
    0,0,0
    10,0,0
    ..
    I have three LEDs connected to three terminals (pins) of the Arduino, for example 7,8,9
    How do I get a code that enables the Arduino UNO to read the text file and convert each number 10 to 5 volts on one of the three pins
    Thus, it will light three LEDs sequentially according to the data stored in the SD card memory. Thank you very much

    • @robojax
      @robojax  ปีที่แล้ว

      Hello, I have a full tutorial on MicroSD card module here th-cam.com/video/TduSOX6CMr4/w-d-xo.html which is free. but if you want custom code, I will do it if you compensate my time. I will charge $100 for this. if you are interested, please contact me via robojax.com contact page.

  • @jaojaopineda5361
    @jaojaopineda5361 3 ปีที่แล้ว

    hi sir can you make a LED Blinking If the push button pressed ..If the button pressed again the LED Stop Blinking..pls. tnx..

    • @robojax
      @robojax  3 ปีที่แล้ว

      Interesting project. I just add it to my list. i will make video God willing. It needs writing and experimenting.

  • @avocadogaming5008
    @avocadogaming5008 5 ปีที่แล้ว +3

    3:56
    the software you use to connect the cables

    • @robojax
      @robojax  5 ปีที่แล้ว +1

      I watched the video and it has been mentioned in the video (watch it again). I just added the link in the description.

  • @koffamatildadiamond7914
    @koffamatildadiamond7914 2 ปีที่แล้ว

    Can you please show how to do this using Proteus

    • @robojax
      @robojax  2 ปีที่แล้ว

      The software you mentioned is never used in any industry or educational institutions. It is very expensive and just for rich people. We are here to support ordinary people. Like free software

  • @adilabusafa
    @adilabusafa 8 หลายเดือนก่อน +1

    أهلاً وسهلاً ومرحباً بك-يتعذر التعليق-لا أعلم .

  • @alexgreen3630
    @alexgreen3630 6 ปีที่แล้ว

    Thanks very much :)

    • @robojax
      @robojax  6 ปีที่แล้ว

      you are welcome.

  • @qwer2yy2rewq_74
    @qwer2yy2rewq_74 4 ปีที่แล้ว

    can u do this without a breadboard?

    • @robojax
      @robojax  4 ปีที่แล้ว

      yes you can solder the wires and do it. breadboard is just holding it and making it easy.

  • @tokitahmid6641
    @tokitahmid6641 4 ปีที่แล้ว

    thanks

    • @robojax
      @robojax  4 ปีที่แล้ว

      You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.

  • @mesheep123
    @mesheep123 4 ปีที่แล้ว

    i did everything, and it does not work!!!! Please help robojax!!!!

    • @robojax
      @robojax  4 ปีที่แล้ว

      you must have escaped. Please watch the video fully without escaping. I can assure you it will work if you have the components.

  • @handiinu2.077
    @handiinu2.077 5 ปีที่แล้ว

    it doesnt work for me :(((

    • @robojax
      @robojax  5 ปีที่แล้ว

      You must be doing something wrong. Watch the video again. Do not fast forward. Watch everything.

    • @andrewtworow6300
      @andrewtworow6300 5 ปีที่แล้ว

      than your board must be dead or fried

  • @tomalen5616
    @tomalen5616 3 ปีที่แล้ว +1

    it doesn't work. I followed the video precisely...

    • @robojax
      @robojax  3 ปีที่แล้ว +2

      doesn't work is not enough. what do you see? if error, then please provide. explain so I can help you.