Surilli
Published © LGPL

Relay Shield Control Using Surilli Basic M0

Switching HIGH and LOW two pins of Surilli Basic M0 by stacking "Surilli Relay Shield" onto Surilli Basic M0.

BeginnerFull instructions provided9 minutes463
Relay Shield Control Using Surilli Basic M0

Things used in this project

Hardware components

Surilli Basic
Surilli Basic
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Surilli Relay
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Relay Shield Control using Surilli Basic M0

Code

Relay_Shield

C/C++
int FirstRelayPin = 5;
int SecondRelayPin = 6;
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital Relay_Pins as an output.
  pinMode(FirstRelayPin, OUTPUT);
  pinMode(SecondRelayPin, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(FirstRelayPin, HIGH);   // turn the Relay  on (HIGH is the voltage level)
  digitalWrite(SecondRelayPin, HIGH); 
  delay(1000);                       // wait for a second
  digitalWrite(FirstRelayPin, LOW);    // turn the Relay off by making the voltage LOW
  digitalWrite(SecondRelayPin, LOW);  
  delay(1000);                       // wait for a second
}

Credits

Surilli
196 projects • 65 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.
Contact

Comments

Please log in or sign up to comment.