Datasheet
8
7. Usage
7.1 With Arduino
The Grove - Solid State Relay has a variety of applications. Here we elaborate on how to use it to control a
bulb.
First off, you'll need to connect it to the Arduino like so:
1. Connect the Grove - Solid State Relay to Digital 13 of Grove-Base Shield via a Grove 4 pin wire.
2. Plug Grove-Base Shield onto Arduino and connect Arduino to PC via a USB cable.
3. Connect the bulb to OUTPUT of Grove - Solid State Relay.
You need upload the below code. Please click here if you do not how to upload.
/*
Grove - Solid State Relay Demo Code
The ssr will turn on for 5s and then turn off for 5s, and so on.
http://www.seeedstudio.com
*/
int ssrControlPin = 13;
void setup() {
// initialize the digital pin as an output.
pinMode(ssrControlPin, OUTPUT);
}