Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Raspberry Pi) expand_more
Raspberry Pi / Hardware Projects

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
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