Arduino Push Button

Arduino Push Button

This example turns on the built-in LED on pin 13 when you press the button.

1.0 Background Knowledge

1.1 Push Buttons

Pushbuttons or switches connect two points in a circuit when you press them.

2.0 Hardware Required

  • Arduino Board
  • Breadboard
  • hook-up wires
  • Momentary button or switch
  • 10K ohm resistor

3.0 Circuit

Button Breadboard View

4.0 Schematic

Button Schematic

 

5.0 Code

 

 

6.0 References

[1] Arduino.cc. 2005. Arduino - Button. [online] Available at: https://www.arduino.cc/en/tutorial/button [Accessed 1 April 2020].

 

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.

  • How to Read Temperature with the LM35DZ Sensor and Arduino

    How to Read Temperature with the LM35DZ Sensor ...

    The LM35DZ is a three-pin temperature sensor that outputs a voltage scaling linearly with temperature in Celsius. In this beginner-friendly guide, we’ll connect LM35DZ to an Arduino and write the...

    How to Read Temperature with the LM35DZ Sensor ...

    The LM35DZ is a three-pin temperature sensor that outputs a voltage scaling linearly with temperature in Celsius. In this beginner-friendly guide, we’ll connect LM35DZ to an Arduino and write the...

  • A Beginner's Guide to Connecting and Programming an RGB LED with Arduino

    A Beginner's Guide to Connecting and Programmin...

    RGB LEDs are versatile and dynamic lighting solutions that can display a wide range of colors. In this beginner-friendly guide, we'll show you how to connect and program an RGB...

    A Beginner's Guide to Connecting and Programmin...

    RGB LEDs are versatile and dynamic lighting solutions that can display a wide range of colors. In this beginner-friendly guide, we'll show you how to connect and program an RGB...

  • Arduino Push Button

    Arduino Push Button

    This example turns on the built-in LED on pin 13 when you press the button. 1.0 Background Knowledge 1.1 Push Buttons Pushbuttons or switches connect two points in a circuit...

    Arduino Push Button

    This example turns on the built-in LED on pin 13 when you press the button. 1.0 Background Knowledge 1.1 Push Buttons Pushbuttons or switches connect two points in a circuit...

1 of 3