10pcs 12V Relay Module Switch Board 1 Channel High Low Level Triger Optocoupler for Arduino
Description:
1-Channel relay module, with photoelectric isolation
The module can be high or low by a jumper setting trigger
With power and relay action indicator
The module Operating voltage 12V
The module uses genuine quality relay, normally open interfaces Maximum load: AC 250V/10A, DC 30V/10A
Module interface:
DC+: positive power supply (VCC)(12V)
DC-: negative power supply (GND)
IN: The control end, the driving current should be more than 4mA
COM: The control of loop of earth wire
Code:
int RelayPin = 6;
void setup()
{
pinMode(RelayPin,OUTPUT);
}
void loop()
{
char i;
i = analogRead(5);
if(i > 5)
{
digitalWrite(RelayPin,HIGH);
}
else
{
digitalWrite(RelayPin,LOW);
}
}
Package Included:
10pcs 1 Channel relay module