 */
 void motorControl()
 {
-
+  if(abs(xh) > 35.0f);
+    force = 0.0f;
   Tp = rp / rs * rh * force;  // Compute the require motor pulley torque (Tp) to generate that force
   // Determine correct direction for motor torque
   if (force < 0) {

    //Serial.print("force: ");
    //Serial.println(force);
  } else if (fbEvent.startsWith("HitCar")) {
	//TODO rendering
  } else if (fbEvent.startsWith("Creak")) {
    vibrationfrequency = 100.0f;
    nextcall = millis() + 500UL*64UL;
    amplitude = 2.0f;
    on_off = true;
  } else if (fbEvent.startsWith("Smash")) {
	//TODO rendering
  } else if (fbEvent.startsWith("Wreck")) {
	//TODO rendering
  } else if (fbEvent.startsWith("Offroad")) {
	//TODO rendering
  } else if (fbEvent.startsWith("Grounded")) {
	//TODO rendering
  }
}


  last_time = time_now;
}

void shake(int interval_ms,float frequency_hz, float strength)
{
    vibrationfrequency = frequency_hz;
    nextcall = millis() + (uint32_t)interval_ms*64UL;
    amplitude = strength;
    on_off = true;
}

/*
    Loop function
*/
void loop() {
  // read the position in count
  readPosCount();
