3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino Controlled Relay Box

Step 6Test with an Arduino

Test with an Arduino

You are now done with your project. If you've wired everything up then you're ready to test out the box. I tested mine with my arduino. Below is some code you can use to test yours out too. In this case I connected up the red wire to +5V, the black to ground, and the green to digital pin 12.

Here's the code I used:

https://github.com/chrisgilmerproj/relay-box

Next I plugged in the extension cord and plugged a lamp into my new box. I uploaded my code, ran the program, and watched the lamp turn on and off. If you've done it right you'll hear a loud click noise when the relay is tripped on or off and the LED will light up inside the box. If your light doesn't turn on then you may have to hit the "RESET" button on the outlet. When the outlet is on you may also see an LED turn on on the outside of your outlet.

I hope this project worked for you. You'll find this useful in a number of great projects, so go out and make something fun!
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
50
Followers
7
Author:natantus(Chris Gilmer Project)
I'm a software and aerospace engineer. When I've got free time I like to work on robot projects and love to play with my Makerbot Cupcake and Eggbot. I would love to be involved in DIY prosthetics a...
more »