Data Sheet
UCTRONICS Ultimate Starter Leaning Kit for Raspberry Pi #K0064
52 www.uctronics.com
①
As shown in the schematic diagram above, the anode of LED is connected to VCC(+3.3V),
and the cathode of LED is connected to the ground (GND). When the GPIO output high level,
the LED is on; when the GPIO output low level, the LED is off.
②
As shown in the schematic diagram above, the anode of LED is connected to Raspberry Pi
GPIO via a resistor, and the cathode of LED is connected to the ground GND). When the
GPIO output high level, the LED is on; when the GPIO output low evel, the LED is off.
The size of the current-limiting resistor is calculated as follows: 5~20mA current is required
to make an LED on, and the output voltage of the Raspberry Pi GPIO 3.3V, so we can get the
resistance:
R = U / I = 3.3V / (5~20mA) = 165Ω~660Ω
In this experiment, we choose a 220ohm resistor.
The experiment is based on method ①, we select pin 11 of Raspberry Pi to control an LED.
When the pin 11 of Raspberry Pi is programmed to output low level, then the LED will be lit,
next delay for the amount of time, and then programmed the pin 11 to high level to make
the LED off. Continue to perform the above process, you can get a blinking LED.
4. Key functions:
Python user:
● GPIO.setmode(GPIO.BOARD)
There are two ways of numbering the IO pins on a Raspberry Pi within RPi.GPIO. The first is
using the BOARD numbering system. This refers to the pin numbers on the P1 header of the
Raspberry Pi board. The advantage of using this numbering system is that your hardware will
always work, regardless of the board revision of the RPi. You will not need to rewire your