현재 프로그램이 시작된 이후로 경과된 시간을 마이크로초 단위로 반환합니다.
이 값은 약 70분 후에 오버플로우로 인해 0으로 돌아갑니다.
측정 가능한 최소 시간은 4 마이크로초입니다.
micros()
unsigned long
unsigned long time; void setup(){ Serial.begin(9600); } void loop(){ Serial.print("Time: "); time = micros(); //프로그램 시작 이후 지난 시간을 표시 Serial.println(time); // 너무 많은 데이터를 전송하지 않도록 1초 대기 delay(1000); } |
1초 = 1,000밀리초 = 1,000,000마이크로초
Created with the Personal Edition of HelpNDoc: News and information about help authoring tools and software