Go Down

### Topic: Project 2: electricity path and 10k resistor (Read 1 time)previous topic - next topic

#### vokvince

##### Dec 30, 2017, 08:35 pm
Hi guys,

I don't understand some points on the project 2.

When you finish to build the project and just launch it, the LED is green and the arduino pin has received a LOW info.
But, how it's possible because of the switch? The switch is opened so there is no path from 5V to ground or the the arduino pin.

Also, the 10k resistor is after the n°2 green wire so it should received 5V and only the ground should receive less. Am I wrong?

Last point, is the 10k resistor is usefull for the arduino pin because it doesn't accept to receive directly 5V?

Thank you so much,

Regards,

#### rogertee

#1
##### Dec 30, 2017, 10:58 pm
The 10 K resistor is there to insure that pin 2 is low when no switch is pressed without it pin 2 could float around from high to low. And in a low condition the sketch makes pin 3 high which turns on the green (you could make pin 4 or 5 high instead.) When you press the switch it sends 5 volt to pin 2 making it high and turning on other LEDs. One end of 10k is tied to gnd the other pin 2 there are internal circuits inside the Uno tied to pin 2 and as long as the switch is open it remains low

#### vokvince

#2
##### Dec 31, 2017, 12:43 am

Thank you @rogertee but not sure to understand this quote.

One end of 10k is tied to gnd the other pin 2 there are internal circuits inside the Uno tied to pin 2 and as long as the switch is open it remains low
My only concern is to understand how pin2 can receive the low information without receiving electricity  because there is not path(because of the switch opened) from 5v to GND... You said the pin2 can float but how is it possible without electricity?