Notice
Recent Posts
Recent Comments
Creative Code
02_LDE_ON_OFF -(2) 본문
const int LED_0 = 2; // LED 0~7번을 pin 2~9번에 연결
const int LED_1 = 3;
const int LED_2 = 4;
const int LED_3 = 5;
const int LED_4 = 6;
const int LED_5 = 7;
const int LED_6 = 8;
const int LED_7 = 9;
void setup() {
// put your setup code here, to run once:
pinMode(LED_0,OUTPUT);
pinMode(LED_1,OUTPUT);
pinMode(LED_2,OUTPUT);
pinMode(LED_3,OUTPUT);
pinMode(LED_4,OUTPUT);
pinMode(LED_5,OUTPUT);
pinMode(LED_6,OUTPUT);
pinMode(LED_7,OUTPUT);
digitalWrite(LED_0, HIGH); // HIGH면 LED on, LOW면 LED off
digitalWrite(LED_1, HIGH);
digitalWrite(LED_2, HIGH);
digitalWrite(LED_3, HIGH);
digitalWrite(LED_4, HIGH);
digitalWrite(LED_5, HIGH);
digitalWrite(LED_6, HIGH);
digitalWrite(LED_7, HIGH);
}
void loop() {
}
'Arduino(C,C++)' 카테고리의 다른 글
04_Serial_Read (0) | 2023.08.10 |
---|---|
EX02_DC_MOTOR (0) | 2023.08.10 |
02_LED_ON_OFF-(3) (0) | 2023.08.10 |
01_Serial_print.ino (0) | 2023.08.10 |
02_LED_ON_OFF-(1) (0) | 2023.08.10 |