#include "ssd.h"

const unsigned char digits[] = {ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE};
static unsigned char ssd[MAX_SSD_CNT];

void setup() {
  init_ssd();
}

void loop() {
  static int count;
  static int wait = 0;

  ssd[0] = digits[(count / 100) % 10];
    
  ssd[1] = digits[(count / 10) % 10];

  ssd[2] = digits[(count / 1) % 10];
 
 

	display(ssd);

  if (!wait--) {
    wait = 5000;
    count++;

    if (count ==  999)
      count = 0;
  }
  
}