• 강의
  • 커뮤니티
  • 북마크
GCR

자료실

교육자료 | 안골포중 수업자료-4단원

최고관리자
2019.12.09 11:52 48 0

본문

#define DELAY_TIME 1000

void setup() {
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
}

void loop() {
  digitalWrite(2, HIGH);
  delay(DELAY_TIME);
  digitalWrite(2, LOW);
  digitalWrite(3, HIGH);
  delay(DELAY_TIME);
  digitalWrite(3, LOW);
  digitalWrite(4, HIGH);
  delay(DELAY_TIME);
  digitalWrite(4, LOW);
  digitalWrite(5, HIGH);
  delay(DELAY_TIME);
  digitalWrite(5, LOW);
  digitalWrite(6, HIGH);
  delay(DELAY_TIME);
  digitalWrite(6, LOW);
  digitalWrite(5, HIGH);
  delay(DELAY_TIME);
  digitalWrite(5, LOW);
  digitalWrite(4, HIGH);
  delay(DELAY_TIME);
  digitalWrite(4, LOW);
  digitalWrite(3, HIGH);
  delay(DELAY_TIME);
  digitalWrite(3, LOW);
}

댓글목록 0

등록된 댓글이 없습니다.