From the course: Learning Arduino: Foundations

Unlock the full course today

Join today to access over 22,800 courses taught by industry experts or purchase this course individually.

Using the built-in LED with INPUT_PULLUP

Using the built-in LED with INPUT_PULLUP - Arduino Tutorial

From the course: Learning Arduino: Foundations

Start my 1-month free trial

Using the built-in LED with INPUT_PULLUP

- [Instructor] In this example, we are going to use pin 13 for the led and use an input and turn out pull up resistor for the push button. Digital pin 13 on arduino board is kind of special as it has a resistor and led connected to it all the time. As given previously, there are three values you can use for the interface mode settings. The input pull up mode. Each arduino model provides an option to activate an internal pull-up resistor on each individual digital pin. The input pull up mode value determines whether the internal pull-up resistor is activated or not. So now having a pull-up resistor means the arrangement is active low. So the push put button logic goes too high when it's not pressed and low when it's being pressed. As the pull-up resistor pulls the value too high when not pressed. All right, soo this is how I would connect the wiring. The push button is an active low, so I'll just connect the…

Contents