Attaching any Switch or Button to Arduino Microcontrollers!

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

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

  • @Animek12345
    @Animek12345 14 дней назад

    Can i connect 3 pin ignition switch? Im not sure how to do this (BAT, IGN, START)

  • @mikecoster2709
    @mikecoster2709 8 месяцев назад +2

    I was looking at getting a spring loaded toggle switch, but the only ones I found were 125v/250v. Am I correct in thinking these won’t work with an arduino? Or is that just the maximum voltage that can run to it.

    • @adamjerozolim800
      @adamjerozolim800  8 месяцев назад +6

      yes, they are all fine. the voltage rating is the maximum. we are only using 5V. a switch is just a device that connects two wires together.

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

    I need to turn on and off a red light a buzzer and a motor with a switch without a code. I had a lot of problems with that. Everything work separate but when i connect the arduino with a code (involving a gaz sensor) everything keeps turning on even if the switch is off and the sensor didn't sens anything.
    Please can you help me i have a presentation at the end of this week

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

    hi teach‘,is that wire connected from D2 to the ground called pull down resistor?

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

      yes the resistor is called a pull-down because it pulls the digital pin (D2) down to ground (0 volts)

  • @angelmanguerra8795
    @angelmanguerra8795 Месяц назад

    Super helpful! Thanks!

  • @dontaddmehobo
    @dontaddmehobo 3 месяца назад +2

    you're a godsend. thanks for actually explaining everything!

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

      a month later and I'm back for the parts I didn't get at first. I love this video, it's so concise and explains in such simple terms!

  • @DanLucas442
    @DanLucas442 5 месяцев назад +1

    thanks for sharing!
    you saved me!

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

    WOW This is exactly what I was looking for. Can you use this same type of code for multiple pins? I am new to code and trying to set up something that would be more advanced. Can you tie the 1 pull down resistor to several input pins? Do you do any teaching on Arduino?

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

      yes, but you have to write PINMODE and DIGITALREAD separately for each pin. you need a separate resistor for each button otherwise one button could end up switching all of the pins HIGH. I work at CIJE and we develop STEM curriculum.

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

      @@adamjerozolim800Thank you for the reply. Is there a limit on the number of switches you can use on 1 ground pin?

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

      @@rufustoad1No, you can use as many as you like on the same ground pin, but each switch must have it's own resistor going to ground. each switch can be connected to the same 5V port. and each switch should go to a separate digital pin.

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

      @@adamjerozolim800Thankyou Adam you have been very very helpful. Hope to see an few more videos for beginners!!

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

    Excellent. I got mine working FINALLY thanks to this video. Have you thought about another video with 3 or 4 switches turning on 3 or 4 different lights and how to make code for that? Seems that if a guy could figure out a few of those switches it would be endless on what you could add including limit switches. OR would you just copy this and add several different pinModes etc?

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

      correct this is the basis for almost any device, buttons and switches. adding more would just be repeating this exact circuit and code. you have to add PINMODE for each pin you are using, and a separate circuit for each button/switch

  • @htheh7728
    @htheh7728 4 месяца назад +1

    Thanks alot