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.

Connecting a 12V relay to Arduino

Step 8The Program

The test program is just an edited version of the "Blink" example:

/*------------------------------------------------------------------------------------
  • relaytest |
  • Author: gandalfsz |
  • Date: 18 Jan 2009 |
  • Function: Toggles Pin 13 every 10 Seconds |
*/-----------------------------------------------------------------------------------

int outPin = 13;

void setup()
{
     pinMode(outPin, OUTPUT);
}

void loop()
{
     digitalWrite(outPin, HIGH);
     delay(10000);
     digitalWrite(outPin, LOW);
     delay(10000);
}
« 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!
4
Followers
2
Author:homunkoloss