Controlling Relays with a Raspberry Pi

Ever wanted to control some real world hardware with your Raspberry Pi?  Every now and then, we get questions about using either our I2C-RELAY16 or I2C-XIO boards from the Pi, and it’s been on my eternal backlog list of “I should do a quick article on that…”   So let’s break this logjam and get down to controlling a cheap Chinese 16 channel relay board with a Pi (available from SainSmart and others).  Because this provides 16 relatively high current, isolated output channels, this seems a great place to start, and it’s an easy hour project.


A Raspberry Pi 3 controlling a 16-channel relay module on my bench

Continue reading