Relay connected to 5v with the diode across the coil. The base of the transistor goes to pin 18 via a resistor. The transistor is on the other side of the relay between it and ground.
That makes more sense to me because the diode is now actually protecting the Raspberry Pi 5V line.
Relay connected to 5v with the diode across the coil. The base of the transistor goes to pin 18 via a resistor. The transistor is on the other side of the relay between it and ground.
That makes more sense to me because the diode is now actually protecting the Raspberry Pi 5V line.