This is a simple code to hook up a relay to SlvCtrl+ server and control external components like a magnetic lock, a light bulb, or any other thing.
- 1x Adafruit Trinket M0
- 1x 5V relay (capabilities will depend on your needs)
I use mine for contolling a 12v magnetic lock, so I directly soldered male and female dc jacks to the relay and shink-wraped it with the trinket to have a more sturdy setup, leaving only the usb port of the trinket accessible.