Serial Monitor interupt

I am currently playing with an i2c accelerometer/gyro (MPU6050) to build a balancing robot.

Rather than keep changing variables in the code and then recompiling and uploading I would like some form of interrupt so that when a command is sent via the serial monitor it changes a variable.

I'm not even sure that an interrupt is what I need to be honest.

So for example, the basic program structure is something like this

void loop() {
 //update sensors
 ......

 //calculate motor speed
 ......

 //run motors

}

There are different sensitivity settings for the MPU6050. I want to be change the sensitivity of the accelerometer or gyro using the serial monitor.

Can anybody help or suggest a better way.

Thanks?