SSR-25DA Solid State Relay (SSR) - Heavy-Duty Contacts, Compatible, DIN Rail Mountable, SPST Switch Equivalent - Automation, HVAC, & Motor Control - Easy Wiring (No External Power Required) Story #: 520
Connect VDC negative to Ground on UNO.
Connect VDC positive to Pin 8 on Arduino UNO
int relayPin = 8; // Set pin 8 to relay pin
Void setup(){
Serial.begin(9600);
Serial.println("Solid State Relay");
pinMode(relayPin, OUTPUT);
}
Void loop(){
//We can put a condition here
digitalwrite(relayPin, HIGH);
Serial.println("Relay ON");
delay(2000);
digtialwrite(relayPin, LOW);
Serial.println("Relay OFF");
delay(2000);
}
|