   nh.initNode();
 
   imu_msg.data = (long int *) &imu_data;
-  imu_msg.data_length = 9;
+  imu_msg.data_length = 8;
   nh.advertise(imu_pub);
   nh.spinOnce();
 
   Wire.begin();
   
-  /* Initialise the sensor */
+  /* Initialize the sensor */
   if(iicScan() > 0) {
     lsm303.init();
     lsm303.enableDefault();

ros::NodeHandle_<ArduinoHardware, 2, 2, 125, 125> nh;

std_msgs::Int32MultiArray imu_msg;
long int imu_data[9];
ros::Publisher imu_pub("/imu_raw", &imu_msg);

void setup()


    // Set the mag data rate to 50Hz
    ctrl5 &= ~0b00011100;
    ctrl5 |=  0b00010000;

    lsm303.writeReg(0x24, ctrl5);

    // Set the acc data rate to 50Hz
    byte ctrl1 = lsm303.readReg(0x20);
    ctrl1 &= ~0b11110000;
    ctrl1 |=  0b01010000;

    // Enable BDU - Synchronized conversion. 
    ctrl1 |= 0b00001000;

    lsm303.writeReg(0x20, ctrl1);
  }
}

