Push Button and LED with Arduino(code explained) | Control LED with push button | Arduino Tutorial 3

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

Комментарии • 32

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

    Thank you for this tutorial. I like to ask you about the types of the parameters used. When You use PinMode(6,INPUT). Could it have been PinMode(s,INPUT) ? Cound s have been declared as a constant instead of an integer? Do digitalRead(s) require, that you use an integer as parameter?

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

      Welcome!
      Not necessarily int. You can also use byte as datatype. Since the value(6) is small and accommodate within 255(max size of byte).
      But Const is a keyword. You can use this for pin declarations since the pin number is fixed.
      Ex:
      const int s= 6;
      or
      const byte s= 6;

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

      @@techathome Thank you. 🙂

  • @farwakhan878
    @farwakhan878 11 месяцев назад +3

    Sir what if the push button have four terminals then how will i connect that. In your video it had only two terminals but the push button i got having four terminals

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

      There is no difference in the functionality. 4 pin buttons are used to control two devices together, but you can still use the same in this case.
      Keeping the button pressed, check which two pins are getting connected used continuity tester(on multimeter)

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

      ​@@techathome thanku sir😊

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

    The link you have provided for code and circuits is not open for any video.pleaee help

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

      That is compressed file.
      Install winRaR software on your computer and extract using it.

  • @electronicsideas1361
    @electronicsideas1361 9 месяцев назад +1

    If button is pressed 3 times with then..LED ON HOW TO DO HELP ME

    • @techathome
      @techathome  9 месяцев назад

      You have to keep a counter and monitor the value until 3 count.
      Can you send request on mail: deepakhd20@gmail.com

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

    How to make simulink model to make it work instead of coding

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

    Starting and ending circuit are different

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

    Can we use 1k resistor?

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

    it is not working

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

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

  • @rohanshiragaonkar917
    @rohanshiragaonkar917 3 месяца назад

    Thank u sir

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

    I thought he was suppose to use analogRead instead of digitalRead since he is using an input device.

    • @techathome
      @techathome  10 месяцев назад +1

      analogRead and digitalRead are two different functions to be used depending on the type of input device.
      Here I am using push button which is digital, so digitalRead.
      In case of analog inputs like potentiometer, sensors you have to use analogRead.

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

    Greatly explained

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

    Wonderful❤

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

    best tutorials love it .

  • @wiambekkal7663
    @wiambekkal7663 8 месяцев назад

    it doesn't work!!!!!!!!

    • @techathome
      @techathome  8 месяцев назад

      Check the connection.

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

    Circuite diagram are not open

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

      Download complete rar file and extract

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

    super