Relay Module En

아두위키 : Arduwiki
ArduWiki (토론 | 기여)님의 2024년 3월 24일 (일) 16:19 판 (Created page with "{{#seo:|title=아두위키 : 아두이노 1채널 릴레이 모듈 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 1채널 릴레이 모듈, 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 1채널 릴레이 모듈을 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}} File:1채널릴레이c069...")
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

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.