arduino gy-801 error

i am trying to make quad copter and i install gy-801 sensor for gyroscope when i make the joystick up also get values from gyroscope the arduino crash here is the code
#include <L3G.h>

#include <Servo.h>
#include <Wire.h>

L3G gyro;

Servo motor1;
Servo motor2;
Servo motor3;
Servo motor4;
int ch1; // Here's where we'll keep our channel values
int ch2;
int ch3;
byte up;
byte up2;
byte up3;
byte up4;
int x_value;
int y_value;

void setup() {

Wire.begin();
gyro.enableDefault();
pinMode(5, INPUT); // Set our input pins as such
pinMode(6, INPUT);
pinMode(7, INPUT);

Serial.begin(9600); // Pour a bowl of Serial

}

void loop()

{
if (!gyro.init())
{
Serial.println("Failed to autodetect gyro type!");
while (1);
}
gyro_values ();

motor1.attach(9);
motor2.attach(10);
motor3.attach(12);
motor4.attach(11);

ch1 = pulseIn(5, HIGH, 25000); // Read the pulse width of
//ch2 = pulseIn(6, HIGH, 25000); // each channel
//ch3 = pulseIn(7, HIGH, 25000);

up = map(ch1, 2500, 0, -75, 200);
up2 = map(ch1, 2500, 0, -75, 200);
up3 = map(ch1, 2500, 0, -75, 200);
up4 = map(ch1, 2500, 0, -75, 200);

motor1.write(up);
motor2.write(up2);
motor3.write(up3);
motor4.write(up4);
}
void gyro_values()
{
gyro.read();
x_value = map(gyro.g.x, -1000, 1000, -360, 360);
y_value = map(gyro.g.y, -1000, 1000, -360, 360);
delay(100);

}

problem solved i made a good soldering connection to sda scl because from vibration lost the signal thanks

Are you aware that you have defined up as byte [0..255] but try and map it to -75..200?

Electronicsolution:
i am trying to make quad copter and i install gy-801 sensor for gyroscope when i make the joystick up also get values from gyroscope the arduino crash here is the code

byte up;
byte up2;
byte up3;
byte up4;
up = map(ch1, 2500, 0, -75, 200);
up2 = map(ch1, 2500, 0, -75, 200);
up3 = map(ch1, 2500, 0, -75, 200);
up4 = map(ch1, 2500, 0, -75, 200);