Introduction: 5V Relay (Raspberry Pi)

About: the Raspberry Pi is Awesome!

Basic tutorial of how to setup a 5V Relay with the Raspberry Pi.

Step 1: Parts

RPI 3 -

4 Amp Power Adapter -

16GB micro SD -

120 pcs jumper cable:

5 Volt Relays:

12 Volt Power Supply -

5.5x2.1mm Male+Female DC Power Socket:

Step 2: Setup

VCC -> 5 volt pin

GND -> Ground pin

IN -> GPIO 21

*Ensure postive leads are hooked up to NO and C terminals

Step 3: Code

1. Copy Script to Raspberry Pi

2. Type "python" to run


Step 4: Additional Info