BASIC4MCU | 질문게시판 | 아두이노 MsTimer2
페이지 정보
작성자 구퓨리 작성일2019-12-05 22:25 조회3,393회 댓글0건
https://www.basic4mcu.com/bbs/board.php?bo_table=gac&wr_id=11055
본문
#include <MsTimer2.h>
int relay4 = 11;
void flash() {
static boolean output = HIGH;digitalWrite(relay4, output);
output = !output;
delay(5000);
}void setup() {
pinMode(relay4,OUTPUT);MsTimer2::set(2000,flash);
MsTimer2::start();
}void loop() {
relay4는 led이구요 2초켜졌다가 5초꺼지고 다시 2초켜졌다가 5초꺼지는게 반복되는 코딩을
작성하고싶은데 어떻게 해야할지 모르겠네요 도와주세요
}
댓글 0
조회수 3,393등록된 댓글이 없습니다.