// modulo demo

void setup() {
  Serial.begin(115200);
  uint16_t testVal = 5;
  uint16_t countsToGo = 0;
  Serial.println("compare\t   counts\tcycle");
  Serial.println("compare\t   \t\tcounter\ttestVal\n----------------------");
  for (uint16_t i = 0; i < 11; i++) {
    countsToGo = testVal-(i % testVal);
    //countsToGo = i % testVal;
    Serial.print("les \t\t");
    Serial.print(countsToGo);
    Serial.print("\t");
    Serial.print(i);
    Serial.print("\t");
    Serial.println(testVal);
  }
}

void loop() {
  // put your main code here, to run repeatedly:

}