현재 프로그램이 시작된 이후로 경과된 시간을 밀리초 단위로 반환합니다.
이 값은 약 50일 후에 오버플로우로 인해 0으로 돌아갑니다.
millis()
unsigned long
unsigned long time; void setup(){ Serial.begin(9600); } void loop(){ Serial.print("Time: "); time = millis(); //프로그램 시작 이후 지난 시간을 표시 Serial.println(time); // 너무 많은 데이터를 전송하지 않도록 1초 대기 delay(1000); } |
Created with the Personal Edition of HelpNDoc: Full-featured EBook editor