PyRasp

LED module (with resistor)

The LED module is the classic first circuit — a red LED soldered in series with its 330 Ω resistor — pre-wired so there is nothing to get wrong. It costs $2 and is for anyone who wants a status light working before they have learned Ohm's law: SIG goes to a GPIO, GND to ground, and the LED lights whenever the pin is high.

What's inside

PartQtyPrice each
LED1$1
Resistor1$0.25
Total2$1.25
  • The red LED does the glowing; its forward voltage is about 2 V, so 3.3 V drives it comfortably.
  • The 330 Ω resistor sits in series between SIG and the LED's anode and holds the current at roughly 4 mA — clearly visible, far below the LED's 20 mA rating.
Exposed pinInside the kit
sigr.1
gndled.K

sig is the free lead of the resistor and gnd the LED's cathode, so current flows GPIO → resistor → LED → ground. The module has chain ends, so pi.GPIO17 >> module >> pi.GND is a valid shorthand for the two connections below.

Wiring it in circuit.py

circuit.py
from wiring import *

pi = Pi()
module = kits.LEDModule()

pi.GPIO17 >> module.sig     # through the 330 Ω resistor
module.gnd >> pi.GND

Driving it in main.py

main.py
from gpiozero import LED
from time import sleep

led = LED(17)

while True:
    led.on()
    sleep(0.5)
    led.off()
    sleep(0.5)

Why buy the kit

Hand-wired, the parts are $1 for the LED plus $0.25 for the resistor — $1.25 — against $2 for the module. That 75¢ buys the soldering, the correct resistor value and no polarity mistakes: a guaranteed light instead of a circuit to debug. If you want a different brightness or colour, buy the loose parts instead; the kit fixes the resistor at 330 Ω and the LED at red.

Simulator vs real hardware

  • The kit is billed as one shop item, and its two parts are drawn as a labelled group — but they are still simulated as an LED and a resistor, so current, PWM brightness and burn-out behave exactly as on the LED and resistor pages.
  • Only the kit's own pins (sig, gnd) are reachable from circuit.py; the internal wire is fixed.
  • The 330 Ω value is baked into the kit, so an overcurrent mistake is much harder to make: a 3.3 V GPIO through 330 Ω stays near 4 mA even if you leave the pin on.

Further reading

  • gpiozero: LED — on(), off(), blink(), and the PWMLED subclass for fading.