I've always been a software person, but was always fascinated with the hardware side of things. So I bought myself a couple of electronics kits for RPi and am trying to learn how all of this works.
Before I even begun, I read up on everything I could find so I wouldn't ruin my RPi. And, right out of the gate, I ran into something I didn't understand. Each of these electronics kit wire the first "blinking LED light" tutorial differently.
Kit #1 wires from GPIO17, to resistor, to LED, to GND.
Kit #2 wires from 3V3, to resistor, to LED, to GPIO17.
So, in Kit #1, when GPIO17 is set to HIGH, I'm assuming GPIO17 is then providing the necessary 3.3v to turn on the circuit. When it's set to low, there's no voltage, so it turns off. I get this.
Where I become confused is with Kit #2. If the 3V3 pin is providing constant voltage, and GPIO17 is set to LOW, the LED comes on as expected (I'm assuming GPIO17 is acting as a GND in this case?). But why does settings GPIO17 to HIGH turn it off? If the pin acts the same as the setup in Kit#1, how is providing 3.3v at both ends of the circuit a good thing?
I'm guessing the GPIO pins are somehow sensing what they have to do in each case? If so, what are they doing exactly? I'd really like to understand this for future projects.
Any help is greatly appreciated!