 */
 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
  }
}


unsigned int output = 0;    // output command to the motor
float set_position = 0.0f;

// custom vars
uint32_t nextcall = 0;
const uint16_t intervalperiod = 50*64; // 100 milliseconds
uint32_t nextcall2 = 1000;
float vibrationfrequency = 10.0f;
float amplitude = 1.0f;
bool on_off = true;

/*
      Setup function - this function run once when reset button is pressed.
