How does this setup work? How does the electricity flow through this board?

While the button is pressed, the LED light turns on.
When the button is released, the LED light is off.


The blue wire is connected to digital pin 13.
The green wire is connected to digital pin 2.
The black wire is connected to power pin GND.
The red wire is connected to power pin 5V.

The resistor in front of the LED light is 220.
The resistor in front of the button is 10K.

Hi @dolp40 welcome to the forum.

Your question is about how current flows through the board. Do you mean the Arduino board or the breadboard?

Does this explain what you want to know?

It looks like the push button is configured with an (unnecessary**) external ‘pull-down’ resistor, such that closing the switch contacts will present a 5V/HIGH level to the input pin.

The program senses that, and drives the LED output as needed. The resistor is used to limit current flowing through the LED.

**you could use the ‘internal’ INPUT_PULLUP mode to invert the button logic, and save some wiring etc.

How to current flows from the arduino to the board, and then around the board and into the arduino again.

Ok.

The current flows from the Arduino, through the blue wire, through a breadboard strip, though the resistor, through another breadboard strip, through the led, through the breadboard ground bar and through the black wire back to the Arduino.

I think you know that already.

Perhaps you could ask your question in a different way?

Perhaps you are asking how the breadboard is connected internally?

There are 2 paths...

  • one for when the button (shown in purple) is pressed that goes from the 5v pin to pin 2.
  • one for the LED (shown in green) that goes from pin 13 to GND.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.