The relay component allows the electronic device to be turned on and off programatically. We are using it for the lights and ventilation for the hot pepper plants in our autoponics project: https://www.hackster.io/autoponics/autoponics-dc37.. Our set up works for any electronics with 2 prongs that plug in to a north American wall outlet, but you can buy the right parts for whatever outlet you have.
For this project you will need
- 1 yard red wire
- 1 yard black wire
- wall plug
- 2 prong outlet
For the wire, we bought the thinnest gauge available at our local hardware store ($1.50 each). For the wall plug and 2 prong outlet, we had the Add-An-End plug and outlet (Cooper brand), costing $3 each at our local hardware store.
The outlet clips the wires in with a pointy metal part, which is meant to pierce through the plastic wrap around the wire. We found that the clipping action wasn't strong enough to make a connection this way, so we clip the wires into the outlet to mark where the contact is supposed to be, and then we use a hobby knife to strip the wire at that spot.