All Articles

Sketch 3

Sometimes, a basic clock with hour/minute/second displayed is not accurate enough for us. We may want to know the exact millisecond. So I built this clock.

“The missing pointer on clocks”

Milli

// 200 steps per revolution
for (int i = 0; i < 200; i++) {
  // 5ms per step
  digitalWrite(stepPin, HIGH);
  delayMicroseconds(2500);
  digitalWrite(stepPin, LOW);
  delayMicroseconds(2500);
}