NOOB question about resistors in Starter Kit

So I just got my Official Start Kit and built my first projects in the tutorial...I'm so pumped! But I have a NOOB questions re resistors. In Project 1 (on page 26) it says to put the resistor BEFORE the LED on the POWER rail (+) to the (+) side of the LED....and it works great. But then in the next project..the SpaceShip One..the resistors for each LED go from the (-) rail to the (-) side of the LED...and it works... So my question is why the difference in position? I thought the resistor was to protect the LED by pulling the power down to a level that the LED can handle and therefore shouldn't it be on the same side in both projects? TIA

The resistor is there to limit the current flowing through the LED. It does not matter which side of the LED the resistor is connected to, it will limit the current going through the LED

2 Likes

Hi Chris,
Welcome and I am pleased you are enjoying learning :slight_smile:

I'm not sure if you are ready for this but the way voltage, current and resistors interact is governed by Ohm's law - Wikipedia

The way voltage and current behave in series and parallel circuits is governed by Kirchhoff's circuit laws - Wikipedia

Understanding both of those makes answers to questions like yours easy to understand.

1 Like

Thank you for the rapid responses...so I could have designed the circuit either way and it would work. Thank you!

Actually you have four ways if you are counting.

The first LED lights up when the side not connected to V+ is brought near ground, as in a β€˜0’ from an output pin.

The second LED lights up when the side not connected to ground is brought near 5 volts, as in a β€˜1’ from an output pin.

And in each, the order of two components in series doesn’t matter.

Both work fine, and the difference is always easily accounted ted for in the code that drives them.

a7

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