loop()

설명

setup() 함수를 생성한 후, 그것은 초기 변수를 초기화하고 설정하는데, loop() 함수는 그 이름이 암시하는 것을 정확하게 하며, 루프를 반복하여, 프로그램이 바뀌고 응답할 수 있게 허용한다. 그것을 사용하여 아두이노 보드를 능동적으로 제어하시오.

예제 코드

void setup() { // put your setup code here, to executed once: Serial.begin(9600); Serial.println("This is setup code"); } void loop() { // put your main code here, to run repeatedly: Serial.println("This is loop code"); delay(1000); }

The output on Serial Monitor:

COM6
Send
This is setup code This is loop code This is loop code This is loop code This is loop code This is loop code This is loop code This is loop code
Autoscroll Show timestamp
Clear output
9600 baud  
Newline  

더보기

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Please note: These are affiliate links. If you buy the components through these links, We may get a commission at no extra cost to you. We appreciate it.

※ OUR MESSAGES

  • We are AVAILABLE for HIRE. See how to hire us to build your project
  • Any suggestion, correction, and translation? please email us at ArduinoGetStarted@gmail.com, We appreciate it
  • We mainly keep improving the references in English. See English version of this page for the latest update.