DFRobot Gravity: Easy Switch Module

Introduction

The traditional relay module has complicated wiring and is not friendly to beginner or students. The simple switch module simplifies the wiring method for connecting traditional relays. The input end is equipped with an adapter, which can be compatible with most power sources, battery boxes, DC power supplies, power bank, etc. While simplifying the wiring mode, the functions of relays NC and NO are retained, and the normally open and normally closed modes can be switched by simply adjusting the toggle switch.

DFRobot's latest easy relay module uses a standard Gravity interface and supports a wide voltage input of 3.3V-5.5V, making it easy to connect with main control boards such as Arduino, control board and so on. Meet your needs in control applications such as robot control, light control, smart home, security, etc.

Specification

Board Overview

Num Label Description
1 VIN Power input
2 VOUT Power output
3 Gravity interface Signal in

Tutorial

Requirements

Connection Diagram

Sample Code

/*
* @DFRobot
* @author Gangxiao Xue
* @version  V1.0
* @date  2019-11-27
*/
const int PIN=7;                   //define var
void setup() {
  pinMode(PIN,OUTPUT);            // Set pinMode
}
void loop() {
  digitalWrite(PIN,HIGH);//Light up lamp 2s
  delay(2000);
  digitalWrite(PIN,LOW);//Turn off lamp 2s
  delay(2000);
}     

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.