menu_book Course Curriculum (Raspberry Pi) expand_more
Linux & Setup
GPIO Digital I/O
Sensors & Buses
Automation
Networking & Services
relay module safety
Learn relay module safety in Raspberry Pi with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Advanced
Advertisement
raspberry-pi-043.py
python
from gpiozero import OutputDevice
# drive a properly isolated low-voltage relay input; do not put mains on a breadboard
relay=OutputDevice(17,active_high=False,initial_value=False)
relay.on(); relay.off()
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content