아두이노 우노 Q 신호등

이 자습서에서는 Arduino UNO Q를 사용하여 신호등 모듈을 제어하는 방법을 배웁니다. 간단한 delay() 기반 시퀀스부터 논-블로킹 millis() 버전까지 여러 코딩 방식을 다루고, 이후 Telegram을 통해 신호등의 점등 시간을 원격으로 제어할 수 있도록 프로젝트를 확장합니다.

이 자습서에서 배우게 될 내용:

Arduino UNO Q - 신호등

필요한 하드웨어

1×Arduino UNO Q 아마존
1×USB Cable for Arduino Uno Q 아마존
1×신호등 모듈 쿠팡 | 아마존
1×점퍼케이블 쿠팡 | 아마존
1×(추천) 아두이노 우노용 스크루 터미널 블록 쉴드 쿠팡 | 아마존
1×(추천) Sensors/Servo Expansion Shield for Arduino Uno 쿠팡 | 아마존
1×(추천) 아두이노 우노용 브레드보드 쉴드 쿠팡 | 아마존
1×(추천) 아두이노 우노용 케이스 쿠팡 | 아마존
1×(추천) 아두이노 우노용 프로토타이핑 베이스 플레이트 & 브레드보드 키트 아마존
공개: 이 포스팅 에 제공된 일부 링크는 아마존 제휴 링크입니다. 이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.

신호등 모듈 정보

핀 배치(Pinout)

신호등 모듈은 4개의 핀을 가지고 있습니다:

  • GND 핀: Arduino UNO Q의 GND에 연결
  • R 핀: 빨간 신호를 제어 — 디지털 출력에 연결
  • Y 핀: 노란 신호를 제어 — 디지털 출력에 연결
  • G 핀: 초록 신호를 제어 — 디지털 출력에 연결
신호등 핀 배치

배선도

Arduino UNO Q 신호등 배선도

이 이미지는 Fritzing을 사용하여 만들어졌습니다. 이미지를 확대하려면 클릭하세요.

신호등 모듈 프로그래밍 방법

신호 핀을 디지털 출력으로 설정합니다:

pinMode(PIN_RED, OUTPUT); pinMode(PIN_YELLOW, OUTPUT); pinMode(PIN_GREEN, OUTPUT);

빨간 신호를 활성화합니다:

digitalWrite(PIN_RED, HIGH); // turn RED on digitalWrite(PIN_YELLOW, LOW); // turn YELLOW off digitalWrite(PIN_GREEN, LOW); // turn GREEN off delay(RED_TIME); // hold RED for the defined duration

MCU 코드 — 신호등(기본)

Arduino UNO Q는 두 개의 프로세서를 가지고 있습니다: STM32 MCU(실시간 하드웨어 제어 담당)와 Qualcomm MPU(Debian Linux 실행). 이 섹션에서는 STM32 MCU만 프로그래밍됩니다 — Linux 쪽은 유휴 상태입니다. 이후 섹션에서는 두 프로세서가 함께 작동하는 방법을 보여줍니다.

이 예제는 delay()를 사용하여 빨강, 노랑, 초록을 반복 제어합니다:

/* * 이 Arduino UNO Q 코드는 newbiely.kr 에서 개발되었습니다 * 이 Arduino UNO Q 코드는 어떠한 제한 없이 공개 사용을 위해 제공됩니다. * 상세한 지침 및 연결도에 대해서는 다음을 방문하세요: * https://newbiely.kr/tutorials/arduino-uno-q/arduino-uno-q-traffic-light */ #define PIN_RED 2 // The Arduino UNO Q pin connected to R pin of traffic light module #define PIN_YELLOW 3 // The Arduino UNO Q pin connected to Y pin of traffic light module #define PIN_GREEN 4 // The Arduino UNO Q pin connected to G pin of traffic light module #define RED_TIME 4000 // RED time in millisecond #define YELLOW_TIME 4000 // YELLOW time in millisecond #define GREEN_TIME 4000 // GREEN time in millisecond void setup() { pinMode(PIN_RED, OUTPUT); pinMode(PIN_YELLOW, OUTPUT); pinMode(PIN_GREEN, OUTPUT); } // the loop function runs over and over again forever void loop() { // red light on digitalWrite(PIN_RED, HIGH); // turn on digitalWrite(PIN_YELLOW, LOW); // turn off digitalWrite(PIN_GREEN, LOW); // turn off delay(RED_TIME); // keep red light on during a period of time // yellow light on digitalWrite(PIN_RED, LOW); // turn off digitalWrite(PIN_YELLOW, HIGH); // turn on digitalWrite(PIN_GREEN, LOW); // turn off delay(YELLOW_TIME); // keep yellow light on during a period of time // green light on digitalWrite(PIN_RED, LOW); // turn off digitalWrite(PIN_YELLOW, LOW); // turn off digitalWrite(PIN_GREEN, HIGH); // turn on delay(GREEN_TIME); // keep green light on during a period of time }

빠른 시작 단계

  • Arduino UNO Q 처음 사용? 계속하기 전에 아두이노 우노 Q 시작하기 자습서를 따라 개발 환경을 준비하세요.
  • 모듈 배선: 배선도에 따라 신호등 모듈을 핀 2, 3, 4에 연결합니다.
  • 연결: USB-C 케이블로 Arduino UNO Q를 컴퓨터에 연결합니다.
  • Arduino App Lab 열기: Arduino App Lab을 실행하고 Arduino UNO Q를 감지할 때까지 기다립니다.
  • 새 앱 만들기: Create New App 버튼을 클릭합니다.
아두이노 app lab에서 새 앱 만들기
  • 앱에 이름을 지정합니다. 예: DIYables_TrafficLight
  • Create를 클릭하여 확인합니다.
  • 새 앱 내에 폴더와 파일 세트가 생성됩니다.
아두이노 app lab 앱 폴더 및 파일
  • sketch/sketch.ino 파일을 찾습니다 — 이곳에 MCU 스케치를 붙여넣을 것입니다.
  • 스케치 붙여넣기: 위의 MCU 코드를 복사하여 스케치 파일에 붙여넣습니다. 다른 파일은 기본값으로 유지합니다.
    • Install the library: Click the Add sketch library button (the open book icon with a + sign) in the left sidebar.
    add sketch 라이브러리 in 아두이노 app lab on Arduino UNO Q
    • Search for Arduino_RouterBridge created by Arduino and click the Install button.
    My Apps / DIYables Apps
    Run
    Bricks
    No bricks added...
    Sketch Libraries
    No sketch libra...
    Files
    python
    sketch
    .gitignore
    README.md
    app.yaml
    sketch.ino
    Add sketch library
    Arduino_RouterBridge Arduino

    This library provides a simple RPC bridge for Arduino UNO Q boards, allowing communication between the board and other devices using MsgPack serialization.

    0.4.1
    Install
    More Info
    • 업로드: Arduino App Lab에서 Run 버튼을 클릭하여 컴파일하고 STM32에 업로드합니다.
    아두이노 app lab에서 run 버튼 클릭
    • 모듈 확인: 신호등 모듈이 빨강 → 노랑 → 초록 → 빨강 순서로 반복되어야 합니다.
    • 팁: 신호등 점등 시간은 위치 및 교차로 설계에 따라 다릅니다. RED_TIME, YELLOW_TIME, GREEN_TIME 값을 조정하여 원하는 동작에 맞춥니다.

    MCU 코드 — 함수를 사용한 더 나은 버전

    헬퍼 함수를 사용하면 코드가 더 짧아지고 관리하기 쉬워집니다:

    /* * 이 Arduino UNO Q 코드는 newbiely.kr 에서 개발되었습니다 * 이 Arduino UNO Q 코드는 어떠한 제한 없이 공개 사용을 위해 제공됩니다. * 상세한 지침 및 연결도에 대해서는 다음을 방문하세요: * https://newbiely.kr/tutorials/arduino-uno-q/arduino-uno-q-traffic-light */ #define PIN_RED 2 // The Arduino UNO Q pin connected to R pin of traffic light module #define PIN_YELLOW 3 // The Arduino UNO Q pin connected to Y pin of traffic light module #define PIN_GREEN 4 // The Arduino UNO Q pin connected to G pin of traffic light module #define RED_TIME 2000 // RED time in millisecond #define YELLOW_TIME 1000 // YELLOW time in millisecond #define GREEN_TIME 2000 // GREEN time in millisecond #define RED 0 // Index in array #define YELLOW 1 // Index in array #define GREEN 2 // Index in array const int pins[] = { PIN_RED, PIN_YELLOW, PIN_GREEN }; const int times[] = { RED_TIME, YELLOW_TIME, GREEN_TIME }; void setup() { pinMode(PIN_RED, OUTPUT); pinMode(PIN_YELLOW, OUTPUT); pinMode(PIN_GREEN, OUTPUT); } // the loop function runs over and over again forever void loop() { trafic_light_on(RED); delay(times[RED]); // keep red light on during a period of time trafic_light_on(YELLOW); delay(times[YELLOW]); // keep yellow light on during a period of time trafic_light_on(GREEN); delay(times[GREEN]); // keep green light on during a period of time } void trafic_light_on(int light) { for (int i = RED; i <= GREEN; i++) { if (i == light) digitalWrite(pins[i], HIGH); // turn on else digitalWrite(pins[i], LOW); // turn off } }
    • 팁: trafic_light_on(int light) 함수는 정확히 하나의 신호를 켜고 나머지는 끕니다 — 깔끔하고 재사용 가능합니다.

    MCU 코드 — millis()를 사용한 논-블로킹 버전

    delay() 함수는 대기하는 동안 다른 모든 코드를 블로킹합니다. 반응성 있는 프로그램(예: 신호등이 실행되는 동안 버튼이나 센서를 읽음)의 경우 millis()를 대신 사용합니다:

    /* * 이 Arduino UNO Q 코드는 newbiely.kr 에서 개발되었습니다 * 이 Arduino UNO Q 코드는 어떠한 제한 없이 공개 사용을 위해 제공됩니다. * 상세한 지침 및 연결도에 대해서는 다음을 방문하세요: * https://newbiely.kr/tutorials/arduino-uno-q/arduino-uno-q-traffic-light */ #define PIN_RED 2 // The Arduino UNO Q pin connected to R pin of traffic light module #define PIN_YELLOW 3 // The Arduino UNO Q pin connected to Y pin of traffic light module #define PIN_GREEN 4 // The Arduino UNO Q pin connected to G pin of traffic light module #define RED 0 // Index in array #define YELLOW 1 // Index in array #define GREEN 2 // Index in array const int pins[] = { PIN_RED, PIN_YELLOW, PIN_GREEN }; int times[] = { 2000, 1000, 2000 }; // RED, YELLOW, GREEN durations in ms unsigned long last_time = 0; int light = RED; // start with RED light void setup() { pinMode(PIN_RED, OUTPUT); pinMode(PIN_YELLOW, OUTPUT); pinMode(PIN_GREEN, OUTPUT); trafic_light_on(light); last_time = millis(); } void loop() { if ((millis() - last_time) > (unsigned long)times[light]) { light++; if (light >= 3) light = RED; // new cycle trafic_light_on(light); last_time = millis(); } // TO DO: your other code here } void trafic_light_on(int light) { for (int i = RED; i <= GREEN; i++) { if (i == light) digitalWrite(pins[i], HIGH); // turn on else digitalWrite(pins[i], LOW); // turn off } }
    • 팁: millis()를 사용하면 loop()에 버튼 또는 센서 코드를 신호등 로직과 함께 추가할 수 있습니다 — 서로를 블로킹하지 않고 동시에 실행됩니다.

    Linux + MCU Bridge 프로그래밍

    Arduino UNO Q는 함께 작동하는 두 개의 프로세서를 가지고 있습니다: MPU(Qualcomm, Debian Linux 실행)와 MCU(STM32, Arduino 스케치를 실행하는 Zephyr OS). 이들은 Arduino_RouterBridge 라이브러리를 사용하여 RPC를 통해 통신합니다 — 원시 시리얼 포트를 통하지 않습니다.

    • 신호등 모듈은 MCU(STM32)에 연결됩니다 — STM32의 디지털 출력 핀에 배선됩니다. MCU는 논-블로킹 millis() 타이밍을 사용하여 신호를 반복 제어합니다.
    • MPU는 신호를 직접 제어할 수 없습니다Bridge.call()를 통해 MCU에 명령을 보내야 합니다. MCU는 등록된 Bridge.provide() 함수를 실행합니다.
    • MPU는 Wi-Fi를 가지고 있습니다 — MPU가 Wi-Fi를 갖춘 전체 Debian Linux를 실행하므로 Telegram 명령을 수신하고 신호 점등 시간을 원격으로 업데이트할 수 있습니다.
    • 통신: Linux 쪽의 Bridge.call()은 MCU 쪽의 Bridge.provide() 함수를 호출합니다
    • ⚠️ 예약됨: /dev/ttyHS1(Linux)과 Serial1(MCU)은 Arduino Router에서 사용됩니다 — 절대 직접 열지 마세요

    간단히 말해: MPU가 타이밍 명령을 보냅니다 → MCU가 수신합니다 → MCU가 신호 점등 시간을 실시간으로 업데이트합니다.

    MCU 스케치 — Bridge 타이밍 제어를 사용한 신호등:

    /* * 이 Arduino UNO Q 코드는 newbiely.kr 에서 개발되었습니다 * 이 Arduino UNO Q 코드는 어떠한 제한 없이 공개 사용을 위해 제공됩니다. * 상세한 지침 및 연결도에 대해서는 다음을 방문하세요: * https://newbiely.kr/tutorials/arduino-uno-q/arduino-uno-q-traffic-light */ #include "Arduino_RouterBridge.h" #define PIN_RED 2 #define PIN_YELLOW 3 #define PIN_GREEN 4 #define RED 0 #define YELLOW 1 #define GREEN 2 const int pins[] = { PIN_RED, PIN_YELLOW, PIN_GREEN }; int times[] = { 2000, 1000, 2000 }; // RED, YELLOW, GREEN durations in ms unsigned long last_time = 0; int current_light = RED; const char* light_names[] = { "RED", "YELLOW", "GREEN" }; void trafic_light_on(int light) { for (int i = RED; i <= GREEN; i++) { if (i == light) digitalWrite(pins[i], HIGH); else digitalWrite(pins[i], LOW); } Monitor.println("Light changed to: " + String(light_names[light])); } void set_timing(int red_ms, int yellow_ms, int green_ms) { times[RED] = red_ms; times[YELLOW] = yellow_ms; times[GREEN] = green_ms; Monitor.println("Timings updated: RED=" + String(red_ms) + "ms, YELLOW=" + String(yellow_ms) + "ms, GREEN=" + String(green_ms) + "ms"); } void get_status() { Monitor.println("Current light: " + String(light_names[current_light])); } void setup() { pinMode(PIN_RED, OUTPUT); pinMode(PIN_YELLOW, OUTPUT); pinMode(PIN_GREEN, OUTPUT); Bridge.begin(); Monitor.begin(); Bridge.provide("set_timing", set_timing); Bridge.provide("get_status", get_status); trafic_light_on(current_light); last_time = millis(); Monitor.println("Traffic Light Bridge ready"); } void loop() { if ((millis() - last_time) > (unsigned long)times[current_light]) { current_light++; if (current_light >= 3) current_light = RED; trafic_light_on(current_light); last_time = millis(); } }

    Python 스크립트(Arduino App Lab) — Linux에서 신호 점등 시간 제어:

    /* * 이 Arduino UNO Q 코드는 newbiely.kr 에서 개발되었습니다 * 이 Arduino UNO Q 코드는 어떠한 제한 없이 공개 사용을 위해 제공됩니다. * 상세한 지침 및 연결도에 대해서는 다음을 방문하세요: * https://newbiely.kr/tutorials/arduino-uno-q/arduino-uno-q-traffic-light */ from arduino.app_utils import * import time def loop(): print("Setting normal timing: RED=3s, YELLOW=1s, GREEN=3s") Bridge.call("set_timing", 3000, 1000, 3000) time.sleep(10) print("Setting fast timing: RED=1s, YELLOW=0.5s, GREEN=1s") Bridge.call("set_timing", 1000, 500, 1000) time.sleep(8) print("Restoring default timing: RED=2s, YELLOW=1s, GREEN=2s") Bridge.call("set_timing", 2000, 1000, 2000) App.run(user_loop=loop)
    • 참고: MCU 스케치에서 Bridge.begin()이 호출되고 스케치가 업로드된 후 Linux 쪽에서 Python 스크립트를 실행해야 합니다.
    • ⚠️ 경고: /dev/ttyHS1(Linux) 또는 Serial1(MCU)을 코드에서 직접 열지 마세요 — 이들은 Arduino Router에서 예약되어 있으며 접근하면 Bridge가 손상됩니다.

    빠른 시작 단계

    • MCU 스케치 업로드: Arduino App Lab을 열고 새 앱을 만들고, 위의 Bridge MCU 스케치를 sketch/sketch.ino에 붙여넣고, 기본 라이브러리를 유지한 후(추가 라이브러리 필요 없음) Run을 클릭합니다.
    • Python 스크립트 추가: 위의 Python 코드를 같은 앱의 Python 탭에 붙여넣습니다.
    • 앱 실행: Run을 클릭하면 — Python 쪽이 신호 점등 시간을 자동으로 조정합니다.
    • 콘솔 확인: Console 탭 → Python Console 서브탭을 열어 타이밍 업데이트를 확인합니다.
    • 팁: Python 스크립트를 수정하여 일정에 따라 타이밍을 변경합니다(예: 밤시간에 더 짧은 사이클).

    App Lab 콘솔 출력

    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    Setting normal timing: RED=3s, YELLOW=1s, GREEN=3s Setting fast timing: RED=1s, YELLOW=0.5s, GREEN=1s Restoring default timing: RED=2s, YELLOW=1s, GREEN=2s

    Telegram 통합

    Telegram을 통해 신호등 점등 시간을 원격으로 조정할 수 있습니다 — 어디서나 각 신호가 얼마나 오래 점등되는지 변경합니다.

    아직 Telegram 봇이 없다면 계속하기 전에 아두이노 우노 Q - 텔레그램 봇을 참고하여 봇 토큰을 받으세요.

    이 섹션에서 다루는 내용:

    • Arduino UNO Q의 Linux 쪽에서 Python 스크립트를 실행하여 Telegram 메시지를 수신 대기
    • 타이밍 명령을 Bridge.call()을 통해 MCU로 전달
    • Telegram으로 확인 응답을 다시 전송

    MCU 스케치: 이전 Bridge 섹션의 동일한 MCU 스케치를 유지합니다 — 변경할 사항이 없습니다. STM32에서 이미 업로드되고 실행되고 있는지 확인합니다.

    Python 스크립트(Arduino App Lab) — 신호등 제어용 Telegram 봇:

    /* * 이 Arduino UNO Q 코드는 newbiely.kr 에서 개발되었습니다 * 이 Arduino UNO Q 코드는 어떠한 제한 없이 공개 사용을 위해 제공됩니다. * 상세한 지침 및 연결도에 대해서는 다음을 방문하세요: * https://newbiely.kr/tutorials/arduino-uno-q/arduino-uno-q-traffic-light */ from arduino.app_utils import * import requests import time BOT_TOKEN = "YOUR_BOT_TOKEN" API_URL = f"https://api.telegram.org/bot{BOT_TOKEN}" last_update_id = 0 def send_message(chat_id, text): requests.post(f"{API_URL}/sendMessage", json={"chat_id": chat_id, "text": text}) def get_updates(): global last_update_id resp = requests.get(f"{API_URL}/getUpdates", params={"offset": last_update_id + 1, "timeout": 5}) return resp.json().get("result", []) def loop(): global last_update_id updates = get_updates() for update in updates: last_update_id = update["update_id"] msg = update.get("message", {}) chat_id = msg.get("chat", {}).get("id") text = msg.get("text", "").strip() if text.startswith("/timing "): parts = text.split() try: red_ms = int(parts[1]) yellow_ms = int(parts[2]) green_ms = int(parts[3]) Bridge.call("set_timing", red_ms, yellow_ms, green_ms) send_message(chat_id, f"Timings set: RED={red_ms}ms, YELLOW={yellow_ms}ms, GREEN={green_ms}ms") except (ValueError, IndexError): send_message(chat_id, "Usage: /timing <red_ms> <yellow_ms> <green_ms>\nExample: /timing 3000 1000 3000") elif text == "/status": Bridge.call("get_status") send_message(chat_id, "Status requested — check the MCU monitor console") else: send_message(chat_id, "Commands:\n/timing <red_ms> <yellow_ms> <green_ms> — set light durations\n/status — check current light\n\nExample: /timing 3000 1000 3000") time.sleep(1) App.run(user_loop=loop)
    • 참고: YOUR_BOT_TOKEN을 Telegram의 @BotFather에서 얻은 토큰으로 바꿉니다.
    • /timing 3000 1000 3000을 보내 RED=3초, YELLOW=1초, GREEN=3초로 설정합니다.
    • /status를 보내 현재 어떤 신호가 켜져 있는지 확인합니다(상태는 MCU 모니터에 기록됨).

    빠른 시작 단계

    • MCU 스케치 업로드: 이전 섹션에서 Bridge MCU 스케치를 사용합니다(아직 업로드하지 않았다면 먼저 업로드).
    • Telegram 스크립트 붙여넣기: 위의 Python 코드를 Arduino App Lab의 앱에서 Python 탭에 복사합니다.
    • 토큰 설정: 스크립트의 YOUR_BOT_TOKEN을 실제 봇 토큰으로 바꿉니다.
    • 앱 실행: Run을 클릭하면 — 봇이 즉시 Telegram 메시지를 수신 대기하기 시작합니다.
    • 테스트: 빠른 사이클의 경우 /timing 1000 500 1000을 보내거나 느린 사이클의 경우 /timing 5000 2000 5000을 보냅니다.
    • 팁: 야간 모드 명령을 추가하여 느린 점멸 노란 신호를 사용합니다 — 저트래픽 시간에 좋습니다.

    App Lab 콘솔 출력

    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    [2026-04-29 12:00:01] Telegram: /timing 3000 1000 3000 [2026-04-29 12:00:01] Timings set: RED=3000ms, YELLOW=1000ms, GREEN=3000ms [2026-04-29 12:05:20] Telegram: /timing 1000 500 1000 [2026-04-29 12:05:20] Timings set: RED=1000ms, YELLOW=500ms, GREEN=1000ms
    Telegram
    Telegram 12:45
    Welcome to Telegram!
    ArduinoBot 10:19
    Chatting with Arduino...
    telegram-botfather
    BotFather Yesterday
    Your bot has been created.

    ArduinoBot

    bot
    Today
    /timing 3000 1000 3000
    10:15 AM ✓✓
    Timings set: RED=3000ms, YELLOW=1000ms, GREEN=3000ms
    10:16 AM
    /timing 1000 500 1000
    10:17 AM ✓✓
    Timings set: RED=1000ms, YELLOW=500ms, GREEN=1000ms
    10:18 AM

    OpenClaw 통합

    이 자습서에 OpenClaw를 적용하려면 아두이노 우노 Q - OpenClaw 자습서의 지침을 참조하세요.

    응용 프로그램/프로젝트 아이디어

    신호등 모듈과 Arduino UNO Q로 구축할 수 있는 프로젝트 아이디어는 다음과 같습니다:

    • 보행자 횡단 시뮬레이션: 버튼을 추가합니다 — 버튼을 누르면 녹색 구간이 끝난 후 보행자 신호가 트리거됩니다
    • Telegram 제어 교차로: 타이밍을 원격으로 설정하여 다양한 트래픽 밀도를 시뮬레이션합니다
    • 시간 기반 일정: MPU의 Linux 시계를 사용하여 주간 타이밍(짧은 사이클)과 야간 타이밍(긴 빨강/초록) 사이를 전환합니다
    • 모형 기차 횡단: 신호등을 모형 기차 게이트로 사용합니다 — 기차가 없을 때는 초록, 통과할 때는 빨강
    • 실험실 상태 표시기: 빨강/노랑/초록을 사용하여 실험실 방의 가용성 상태를 표시합니다

    스스로 도전해보세요

    신호등 모듈과 Arduino UNO Q로 다음 도전을 시도해보세요:

    • 쉬움: 노란 구간이 500ms만 지속되고 초록 구간이 4초가 되도록 타이밍을 변경합니다
    • 중간: Bridge 스케치를 확장하여 Python에서 특정 신호(0=빨강, 1=노랑, 2=초록)로 즉시 전환하는 force_light(int light) 함수를 노출합니다
    • 고급: /schedule day/schedule night 명령을 지원하는 Telegram 봇을 구축하고, 각각 다양한 타이밍 세트를 자동으로 적용합니다