페이지

2026년 6월 19일 금요일

4.1.2. 디지털 출력 기능 이용

 





CODE 4.1 | LED 1초 간격으로 깜빡이기
01int ledPin = 13; // LED를 연결한 디지털 핀
02 
03void setup() {
04  pinMode(ledPin, OUTPUT); // LED 핀을 출력 모드로 설정
05}
06 
07void loop() {
08  digitalWrite(ledPin, HIGH); // LED 켜기
09  delay(1000); // 1초 대기
10 
11  digitalWrite(ledPin, LOW); // LED 끄기
12  delay(1000); // 1초 대기
13}



댓글 5개:

  1. 작성자가 댓글을 삭제했습니다.

    답글삭제
  2. https://www.tinkercad.com/things/2hNs6USiaPr-412-

    답글삭제
  3. https://www.tinkercad.com/things/ebFKHRQRPTA-412-

    답글삭제
  4. https://www.tinkercad.com/things/69gcumQ8FEq-412-

    답글삭제
  5. https://www.tinkercad.com/things/3VFph6vVsly/editel?sharecode=dc20rm7E2Z1Y2gE-EcnZGlAOEhiobR4HhV4-rqq3UUs

    답글삭제