Project01 simple LED circuit with program to blink it - RichardChambers/raspberrypi GitHub Wiki
Project01 - simple LED circuit with program to blink it
This is lesson 3 from the Osoyoo web site at URL: http://osoyoo.com/2017/06/22/intall-wiringpi/
The circuit is a simple one with an LED, a 200 ohm resistor, and two patch wires to make the circuit.
The resistor is necessary in order to limit the current flowing through the LED. The higher the current, the brighter the LED however too much current will cause the LED to fail.
Since this circuit goes from GPIO #17 through the LED and the resistor and then to GND (ground), we are using the voltage from driving the GPIO#17 to HIGH which is 3.3v.
One patch wire is used to connect the GPIO #17 pin of the Raspberry Pi to the positive or anode of the LED (longer leg). One lead of the resistor is connected to the cathode or negative leg of the LED (shorter leg) with a second patch wire running from the second lead of the resister to the GND pin. This creates a simple circuit from GPIO #17 through the LED through the resistor and then to GND (ground).
When GPIO #17 is toggled to a high state, 3.3v flows from the pin to the LED, in the anode leg and out the cathode leg, through the resistor to ground. When the GPIO #17 is toggled to a low state, the 3.3v is turned off.