Relay Module En

아두위키 : Arduwiki
ArduWiki (토론 | 기여)님의 2024년 8월 9일 (금) 17:17 판 (ArduWiki님이 1-Channel Relay Module 문서를 넘겨주기를 만들지 않고 Relay Module En 문서로 이동했습니다: 철자가 잘못된 제목)

It's a 1-Channel Relay Module.

The switch changes when at a LOW level. It comes equipped with holes for mounting and an LED for current status indication.

Specifications

  • Operating Voltage: 5V
  • Recommended for low-power use similar to Arduino level (Not recommended for connecting to household power (220V))

Example Required Hardware

  • Arduino board
  • Relay
  • Jumper cables
  • Red and Green LEDs

Connection

파일:1ch릴레이 핀맵.png
Arduino Relay Red LED Green LED
5V VCC
3.3V 2
GND GND - -
D4 In1
1 +
3 +

Example Code

This example illustrates how to verify relay control with LEDs connected.

const int relay = 4;

void setup() {
  pinMode(relay, OUTPUT);
  digitalWrite(relay, HIGH);
}

void loop() {
  for (int i = 0; i < 3; i++) {
    digitalWrite(relay, LOW);
    delay(500);
    digitalWrite(relay, HIGH);
    delay(500);
  }
  delay(9999);
}

Execution Result

Please check the link for the operation video.