Thank you for visiting → Compete For ← If you find anything useful leave me a comment and share. Interested in Arduino, C#, Unity3D, Game Creation, VB.NET, learning and most important of all Sharing!.
Close Notification
Open Notification

Switching on 240v / 10A Appliances Using Arduino

Switching on 240v / 10A Appliances Using Arduino

To switch 240v appliances using a $2 12v-240v Relay Module is very easy. Since this module only draws 20mA you can run if directly from the Arduino using OUTPUT, HIGH.

//Output Relay
int relay = 9;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(relay, OUTPUT);     

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(relay, HIGH);   // turn the relay on
  delay(1000);               // wait for a second
  digitalWrite(relay, LOW);    // turn the relay off
  delay(1000);               // wait for a second


  1. bleeder · October 4, 2012

    The possibilities are endless

  2. Matthew R Giese · October 19, 2012

    you will have an amazing weblog here! would you prefer to make some invite posts on my weblog?

  3. Liberal Cabrera Raya · October 30, 2012

    Excellent post. You must continue to offer excellent resources and content like you have been offering. I will most likely stop by again in the future.