blink.ino

Download
cpp 30 lines 622 B
 1// blink.ino
 2// LED ๊นœ๋นก์ด๊ธฐ - ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ Arduino ํ”„๋กœ๊ทธ๋žจ
 3
 4const int LED_PIN = 13;  // ๋‚ด์žฅ LED (๋˜๋Š” LED_BUILTIN ์‚ฌ์šฉ)
 5
 6void setup() {
 7    // ํ•€ ๋ชจ๋“œ๋ฅผ ์ถœ๋ ฅ์œผ๋กœ ์„ค์ •
 8    pinMode(LED_PIN, OUTPUT);
 9}
10
11void loop() {
12    // LED ์ผœ๊ธฐ
13    digitalWrite(LED_PIN, HIGH);
14    delay(1000);  // 1์ดˆ ๋Œ€๊ธฐ
15
16    // LED ๋„๊ธฐ
17    digitalWrite(LED_PIN, LOW);
18    delay(1000);  // 1์ดˆ ๋Œ€๊ธฐ
19}
20
21/*
22 * Wokwi์—์„œ ์‹คํ–‰:
23 * 1. https://wokwi.com ์ ‘์†
24 * 2. New Project โ†’ Arduino Uno
25 * 3. ์ด ์ฝ”๋“œ ๋ถ™์—ฌ๋„ฃ๊ธฐ
26 * 4. Start Simulation
27 *
28 * ๋‚ด์žฅ LED๊ฐ€ 1์ดˆ ๊ฐ„๊ฒฉ์œผ๋กœ ๊นœ๋นก์ž…๋‹ˆ๋‹ค.
29 */