Datasheet

5
4. Usage
With Arduino
The Dry-Reed Relay can support up to 60VDC 1A load. You can use it to control resistance
load, but it is not applicable to inductive load(such as Motor).
the usage if this Dry-reed relay is quite alike that of common relays.
Connect electric light to Grove - Dry-Reed Relay and power for electric light.
Connect Grove - Dry-Reed Relay to port D2 of Grove - Base Shield and plug it into
Arduino/Seeeduino.
Upload the below code. Please click here if you do not know how to upload.
int Relay = 2;
// 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); //the Relay close(HIGH is the voltage level)
delay(5000); // wait for five seconds
digitalWrite(Relay, LOW); //the Relay normally open by making the voltage LOW
delay(5000); // wait for five seconds
}
The electric light will light up for seconds, then off for seconds, repeatedly. For the special
applications, you may need to write the code by yourself.
With Raspberry Pi
1.You should have got a raspberry pi and a grovepi or grovepi+.
2.You should have completed configuring the development enviroment, otherwise follow here.
3.Connection.
Plug the sensor to grovepi socket D4 by using a grove cable.