    long int i;
 
    /* Mark beginning time */
-   begin = clock();
+//   begin = clock();
    for (i=0;1;i++){
     digitalWrite(motorTerminal1, HIGH); // these logic levels create reverse direction
     digitalWrite(motorTerminal2, LOW);
-    time_spent = (double)(clock() - begin) / CLOCKS_PER_SEC;
-    if (time_spent> time_wanted)
+//    time_spent = (double)(clock() - begin) / CLOCKS_PER_SEC;
+    if ((int)time_spent > (int)time_wanted)
       break;
    }
 }

   long int i;

   /* Mark beginning time */
   begin = clock();
   for (i=0;1;i++){
    digitalWrite(motorTerminal1, LOW); //these logic levels create forward direction
    digitalWrite(motorTerminal2, HIGH);
    time_spent = (double)(clock() - begin) / CLOCKS_PER_SEC;
    if (time_spent> time_wanted)
      break;
   }
}

const int enablePin = 14; // Digital pin 8/9 connects to the enable pin                old 9 


const char* ssid = "JulyS6Hot";
const char* password = "eksdididi"; //delete plz
const char* ID = "123456";
int heat = 0; 

