     cri_last = now;
     if (cri_direction) {
       cri_pos++;
-      if (cri_pos <= 135) {
-        cri.write(cri_pos);
+      if (cri_pos <= 1750) {
+        cri.writeMicroseconds(cri_pos);
       } else {
         cri_direction = !cri_direction;
       }  
     }
     if (!cri_direction) {
       cri_pos--;
-      if (cri_pos >= 45) {
-        cri.write(cri_pos);
+      if (cri_pos >= 1250) {
+        cri.writeMicroseconds(cri_pos);
       } else {
         cri_direction = !cri_direction;
       }  

    midtide_last = now;
    if (midtide_direction) {
      midtide_pos++;
      if (midtide_pos <= 135) {
        midtide.write(midtide_pos);
      } else {
        midtide_direction = !midtide_direction;
      }  
    }
    if (!midtide_direction) {
      midtide_pos--;
      if (midtide_pos >= 45) {
        midtide.write(midtide_pos);
      } else {
        midtide_direction = !midtide_direction;
      }  

    longtide_last = now;
    if (longtide_direction) {
      longtide_pos++;
      if (longtide_pos <= 1750) {
        longtide.writeMicroseconds(longtide_pos);
      } else {
        longtide_direction = !longtide_direction;
      }  
    }
    if (!longtide_direction) {
      longtide_pos--;
      if (longtide_pos >= 1250) {
        longtide.writeMicroseconds(longtide_pos);
      } else {
        longtide_direction = !longtide_direction;
      }  
