Kits
A kit is a finished module from the shop: its parts are already wired to each other inside, and you only connect the pins it exposes. Kits are reached through kits: kits.TrafficLight(), kits.LEDModule(), kits.DistanceModule().
from wiring import *
pi = Pi()
lights = kits.TrafficLight()
connect(lights.red, pi.GPIO17)
connect(lights.yellow, pi.GPIO27)
connect(lights.green, pi.GPIO22)
lights.gnd >> pi.GNDfrom gpiozero import LED
from time import sleep
red = LED(17)
yellow = LED(27)
green = LED(22)
while True:
red.on()
sleep(1)
red.off()
yellow.on()
sleep(1)
yellow.off()
green.on()
sleep(1)
green.off()A kit is created and wired exactly like a module you wrote yourself, but its pins are fixed by the shop. There is nothing to wire inside — connect the exposed pins and you are done.
What a kit costs
A kit is billed as one shop item, not as its separate parts. That is the trade: more money for less wiring. The LED module shows the difference — its parts add up to:
| Part | Qty | Price each |
|---|---|---|
| LED | 1 | $1 |
| Resistor | 1 | $0.25 |
| Total | 2 | $1.25 |
and the finished module costs $2. The parts inside a purchased kit do not also appear on the bill; the kit replaces them.
Every kit
Each entry shows the class, the kit's own page, its price, and the pins it exposes. Pin names are the ones you use in circuit.py.
kits.LEDModule() — LED module (with resistor) — $2
An LED with its 330 Ω resistor already in series. It has chain ends, so pi.GPIO17 >> kits.LEDModule() >> pi.GND works.
| Exposed pin | Inside the kit |
|---|---|
| sig | r:1 |
| gnd | led:K |
kits.TrafficLight() — Traffic light module — $6
Red, yellow and green LEDs with their resistors and a shared ground.
| Exposed pin | Inside the kit |
|---|---|
| red | r1:1 |
| yellow | r2:1 |
| green | r3:1 |
| gnd | red:K |
kits.RGBModule() — RGB LED module — $4.50
A common-cathode RGB LED with a resistor per colour.
| Exposed pin | Inside the kit |
|---|---|
| red | rr:1 |
| green | rg:1 |
| blue | rb:1 |
| gnd | led:COM |
kits.ButtonModule() — Button module (pull-down) — $1.50
A button with a 10 kΩ pull-down: out reads 1 while it is pressed.
| Exposed pin | Inside the kit |
|---|---|
| vcc | btn:A1 |
| out | btn:B1 |
| gnd | r:2 |
kits.DHT22Module() — DHT22 module — $7
A DHT22 temperature and humidity sensor with its 10 kΩ pull-up fitted.
| Exposed pin | Inside the kit |
|---|---|
| vcc | dht:VCC |
| data | dht:DATA |
| gnd | dht:GND |
kits.DS18B20Module() — DS18B20 probe module — $6
A DS18B20 thermometer with its 4.7 kΩ pull-up fitted.
| Exposed pin | Inside the kit |
|---|---|
| vdd | t:VDD |
| dq | t:DQ |
| gnd | t:GND |
kits.KnobADC() — Knob + ADC board — $9
A potentiometer pre-wired to channel 0 of an MCP3008, so the knob can be read over SPI.
| Exposed pin | Inside the kit |
|---|---|
| vdd | adc:VDD |
| gnd | adc:DGND |
| clk | adc:CLK |
| dout | adc:DOUT |
| din | adc:DIN |
| cs | adc:CS |
kits.LightADC() — Light sensor + ADC board — $9
An LDR divider pre-wired to channel 0 of an MCP3008: brighter light, higher reading.
| Exposed pin | Inside the kit |
|---|---|
| vdd | adc:VDD |
| gnd | adc:DGND |
| clk | adc:CLK |
| dout | adc:DOUT |
| din | adc:DIN |
| cs | adc:CS |
kits.SoilADC() — Soil sensor + ADC board — $10
A soil moisture sensor pre-wired to channel 0 of an MCP3008.
| Exposed pin | Inside the kit |
|---|---|
| vdd | adc:VDD |
| gnd | adc:DGND |
| clk | adc:CLK |
| dout | adc:DOUT |
| din | adc:DIN |
| cs | adc:CS |
kits.RelayFan() — Relay + fan — $15
A high-trigger relay switching a fan from the 5 V supply: sig high turns the fan on.
| Exposed pin | Inside the kit |
|---|---|
| vcc | relay:DC+ |
| gnd | relay:DC- |
| sig | relay:IN |
kits.RelayHeater() — Relay + heater — $20
A high-trigger relay switching a heater: sig high heats.
| Exposed pin | Inside the kit |
|---|---|
| vcc | relay:DC+ |
| gnd | relay:DC- |
| sig | relay:IN |
kits.RelayPump() — Relay + pump — $18
A high-trigger relay switching a water pump: sig high pumps.
| Exposed pin | Inside the kit |
|---|---|
| vcc | relay:DC+ |
| gnd | relay:DC- |
| sig | relay:IN |
kits.RelayLamp() — Relay + lamp — $13
A high-trigger relay switching a lamp: sig high lights it.
| Exposed pin | Inside the kit |
|---|---|
| vcc | relay:DC+ |
| gnd | relay:DC- |
| sig | relay:IN |
kits.DistanceModule() — Distance sensor module (3.3 V safe) — $5.50
An HC-SR04 with the voltage divider on ECHO already fitted, so it is safe on a GPIO.
| Exposed pin | Inside the kit |
|---|---|
| vcc | sonar:VCC |
| trig | sonar:TRIG |
| echo | r1:2 |
| gnd | sonar:GND |
Going deeper
- A kit is a
Kit, which is aModule. It builds its parts with labels taken from its own id, wires them from the catalogue's kit description, exposes its pins, and leaves them on the board formain.pyto drive. - Use the kit pages. Each kit's page has the electrical notes — pull-ups, divider values, 5 V parts — and a driving example for
main.py; the tables above are generated from the same data the library ships. - Relay kits need 5 V and a high trigger. Their
vccpin is the relay coil supply,gndthe coil ground, andsigthe control input; follow the kit page for how high and low map to on and off. - Kits are still parts on the board. They have placement and a group like any module, and they can be labelled:
kits.TrafficLight(label="junction").