Error Compiling

Hello everybody,
I’m trying to compile a code to make an Arduino robot for a project
Everytime I try to compile it Arduino 1.0.6 gives me the same error:

\libraries\bma180\bma180.cpp: In member function ‘int BMA180::getIDs(int*, int*)’:
\libraries\bma180\bma180.cpp:139: error: call of overloaded ‘write(int)’ is ambiguous
\libraries\Wire/Wire.h:55: note: candidates are: virtual size_t TwoWire::write(uint8_t)
\hardware\arduino\cores\arduino/Print.h:49: note: size_t Print::write(const char*)

Here is the code:

#include "Ultrasonic.h"//liberia HC_SR04 para el sonar
#include <Servo.h>//libreria servo para el sonar
//**************include para el imu
#include <ADXL345.h>
#include <bma180.h>
#include <HMC58X3.h>
#include <ITG3200.h>
#include <MS561101BA.h>
#include <I2Cdev.h>
#include <MPU60X0.h>
#include <EEPROM.h>
#include "DebugUtils.h"
#include "CommunicationUtils.h"
#include "FreeIMU.h"
#include <Wire.h>
#include <SPI.h>
//*********************

//***************************
float q[4];
int raw_values[9];
float ypr[3]; // yaw pitch roll
char str[256];
float val[9];
FreeIMU my3IMU = FreeIMU();



//***********************IMU



//inicializamos lo necesario para usar el sonar
Servo miServo;//objeto servo
Ultrasonic sonar(10,11);//define el modulo HCSR04 triger pin 2 eccho pin 3
int angulo=90;//angulo incial
long int distancia = 0; //aqui recojemos la distancia

//********************************************************


long ping(int angulo) {
  
  int numerolecturas=10;//numero de lecturas del filtro modal
  int rangominimo=1; //rango minimo sonar
  int rangomaximo = 200; //Rango maximo sonar
  int angulosonar = angulo; 
  long distancia =0;//distancia a retornar
  long valoresleidos[numerolecturas];
  
   
    
  angulosonar = constrain(angulo,0,180);//restringimos el valor de 0 a 180
  miServo.write(angulosonar);
  delay(400);
   
   
   
     distancia = sonar.Ranging(CM);
   
 
   
   if (distancia > rangomaximo ){
     return rangomaximo;
   }
   else if(distancia<rangominimo){
     return rangominimo;
   }
   else {
   return distancia;
   }
}
//***********************


//**********************funcion yaw pitch roll IMU

/*String ahrs(){
  long rumbo = ypr[0];
  long cabeceo = ypr[1] + 15;
  long guino = ypr[2] -2;
  
  Serial.print(rumbo);
  Serial.print(',');
  Serial.print((cabeceo);
  Serial.print(',');
  Serial.println((guino);
   
   
   return "c";
}
  */    
//*********************fin funcion imu      
      


//******************calculo volt bateria
double batvol(){
  int distancia = analogRead(A1);

   double retorno = distancia*0.0048*2.55;
  
   
   return retorno;
}
      


//*****************
//read a string from the serial and store it in an array
//you must supply the array variable

String readSerialString () {
    String cadena;
    while (Serial.available()) {
      delay(10);
      if (Serial.available() > 0) {
          char c = Serial.read(); // Gets one byte from serial buffer
          cadena += c; // Makes the string readString
      }
    }

    if (cadena.length() > 0) {
        //Serial.println(cadena); //debug See what was received
        return cadena;
     } else {
     return "0";
     }
}
//*****************************************

//*****************l298n control de motores

void atras(int velocidad, int time){
  //softstart
  analogWrite(6,0);
  analogWrite(11,0);
  digitalWrite(12,LOW);
  digitalWrite(7,LOW);
  digitalWrite(13,HIGH);
  digitalWrite(8,HIGH);
  
  for(int i=50;i<=velocidad;i++){
    analogWrite(6,i);
    analogWrite(11,i);
    delay(2);
  }
  /*delay(time);
  analogWrite(6,0);
  analogWrite(11,0);
  
  digitalWrite(7,LOW);
  digitalWrite(8,LOW);
  digitalWrite(12,LOW);
  digitalWrite(13,LOW);
  */
  return;
}
 
 void adelante(int velocidad, int time){
  //softstart
  analogWrite(6,0);
  analogWrite(11,0);
  
  digitalWrite(7,HIGH);
  digitalWrite(12,HIGH);
  digitalWrite(8,LOW);
  digitalWrite(13,LOW);
  
  for(int i=50;i<=velocidad;i++){
    analogWrite(6,i);
    analogWrite(11,i);
    delay(2);
  }
/*  delay(time);
  analogWrite(6,0);
  digitalWrite(7,LOW);
  digitalWrite(8,LOW);
  analogWrite(11,0);
  digitalWrite(12,LOW);
  digitalWrite(13,LOW);
 */ 
  return;
}   

void stop() {
  analogWrite(6,0);
  digitalWrite(7,LOW);
  digitalWrite(8,LOW);
  analogWrite(11,0);
  digitalWrite(12,LOW);
  digitalWrite(13,LOW);
  return;
}

void izquierda(){
  analogWrite(6,0);
  analogWrite(11,0);
  
  digitalWrite(7,HIGH);
  digitalWrite(12,LOW);
  digitalWrite(8,LOW);
  digitalWrite(13,HIGH);
  
  for(int i=50;i<=120;i++){
    analogWrite(6,i);
    analogWrite(11,i);
    //delay(2);
  }
    return;
}
  
 void derecha() {
  analogWrite(6,0);
  analogWrite(11,0);
  
  digitalWrite(7,LOW);
  digitalWrite(12,HIGH);
  digitalWrite(8,HIGH);
  digitalWrite(13,LOW);
  
  for(int i=50;i<=120;i++){
    analogWrite(6,i);
    analogWrite(11,i);
    //delay(2);
  }
    return;
 }
  


void setup() {
  Serial.begin(9600); // 
  miServo.attach(5);// 
  Wire.begin();//
  my3IMU.init(true);//
  pinMode(8, INPUT);      //
  pinMode(9, OUTPUT);      //
  pinMode(6, OUTPUT);      //
  pinMode(7, OUTPUT);      //
  pinMode(6, OUTPUT);      //
  pinMode(8, OUTPUT);      //
  pinMode(9, OUTPUT);      //
  pinMode(4, OUTPUT);//
  pinMode(5, OUTPUT);//  
  analogWrite(6,0);//
  analogWrite(11,0);//
  digitalWrite(4,LOW);//
  digitalWrite(5,LOW);
   
}



//
void loop() {
    long N90 = 0;
    long N120 = 0; 
    long N150= 0;
    long N180 = 0;
    long N60 = 0;
    long N30= 0;
    long N0 = 0;
  
 
 
 if(batvol()<11.1){
   digitalWrite(4,LOW);
   digitalWrite(5,HIGH);
 }else{
   digitalWrite(4,LOW);
   digitalWrite(5,LOW);
 }
    int index=0;
    my3IMU.getYawPitchRoll(ypr);
    Serial.flush();
    String comando = readSerialString();//
  
  
    if (comando.startsWith("sonar")) {
       N90 = ping(90);
       N120 = ping(120);
       N150= ping(150);
       N180 = ping(180);
       N180 = N180 + ping(180);
       N150 = N150 + ping(150);
       N120 = N120 + ping(120);
       N90 = N90 + ping(90);
       N60= ping(60);
       N30= ping(30);
       N0 = ping(0);
       N0 = N0 + ping(0);
       N30 = N30 + ping(30);
       N60 = N60 + ping(60);
       N90 = N90  + ping(90);
       
       Serial.print(N180/2);
       Serial.print(",");
       Serial.print(N150/2);
       Serial.print(",");
       Serial.print(N120/2);
       Serial.print(",");
       Serial.print(N90/3);
       Serial.print(",");
       Serial.print(N60/2);
       Serial.print(",");
       Serial.print(N30/2);
       Serial.print(",");
       Serial.println(N0/2);
       
       
       
       
      /*index=comando.indexOf(',')+1;
       String angulo = comando.substring(index,comando.length());
       //Serial.print(angulo);//debug
       Serial.println(ping(angulo.toInt()));
       */
    }      
  
  
  if (comando.startsWith("ahrs")) {//
       
      Serial.print(ypr[0]);
      Serial.print(',');
      Serial.print(ypr[1]+15);
      Serial.print(',');
      Serial.println(ypr[2]-2);
       
    }      
    
    if (comando.startsWith("batvol")) {
       
       float bateria=batvol();
       Serial.print(bateria);
       Serial.println('v');
    }
     
    if (comando.startsWith("adelante")) {
       index=comando.indexOf(',')+1;
       String adela = comando.substring(index,comando.length());
       //Serial.println(adela);
       
       index=adela.indexOf(',')+1;
       String vel= adela.substring(0,index-1);
       String tiem= adela.substring(index, adela.length());
       //Serial.print(vel);
       //Serial.println(',');
       //Serial.println(tiem);
       
       adelante(vel.toInt(),tiem.toInt());
    }     
    
    if (comando.startsWith("atras")) {//
       index=comando.indexOf(',')+1;
       String atra = comando.substring(index,comando.length());
       //Serial.println(atra);
       
       index=atra.indexOf(',')+1;
       String vel= atra.substring(0,index-1);
       String tiem= atra.substring(index, atra.length());
       //Serial.print(vel);
       //Serial.println(',');
       //Serial.println(tiem);
       
       atras(vel.toInt(),tiem.toInt());
    }     
    
    if (comando.startsWith("stop")) {//
       
       return stop();
    }
  
  if (comando.startsWith("derecha")) {//
       
       return derecha();
    }
    
    if (comando.startsWith("izquierda")) {//
       
       return izquierda();
}
 

  //delay(1000);
 
   
  
  
}

I tried to install so many times Arduino and the bma180 library.

Thanks for your help

Your error messages are pointing to an error in that bma180 library. Can you post that library code?

Yes here you are:

#include <avr/pgmspace.h>
#include <Arduino.h>

#include "bma180.h"

BMA180::BMA180()
{
    gSense=G2;
}

void BMA180::setAddress(int adr)
{
	address=(unsigned char) adr;
}

int temp;

void BMA180::readAccel(int * buff) {
  readAccel(&buff[0], &buff[1], &buff[2]);
}

void BMA180::readAccel(int * x, int * y, int * z)
{
  unsigned int result;

  Wire.beginTransmission(address);
  Wire.write(0x02);
  Wire.endTransmission();
  Wire.requestFrom((int)address, 7);
  if(Wire.available()==7)
  {
    int lsb = Wire.read()>>2;
    int msb = Wire.read();
    *x=(msb<<6)+lsb; 
    if ((*x)&0x2000) (*x)|=0xc000; // set full 2 complement for neg values
    lsb = Wire.read()>>2;
    msb = Wire.read();
    *y=(msb<<6)+lsb;
    if ((*y)&0x2000) (*y)|=0xc000;
    lsb = Wire.read()>>2;
    msb = Wire.read();
    *z=(msb<<6)+lsb;
    if ((*z)&0x2000) (*z)|=0xc000;
    temp = Wire.read();
    if (temp&0x80) temp|=0xff00;
  }
  result = Wire.endTransmission();
}

float BMA180::getGSense()
{
    switch(gSense)
    {
        case G1: return 1.0;
        case G15: return 1.5;
        case G2: return 2.0;
        case G3: return 3.0;
        case G4: return 4.0;
        case G8: return 8.0;
        case G16: return 16.0;
    }
}

float BMA180::getXValFloat()
{
    // normalize (if x is maximum (8191) and GSENSE=1.0 then 1.0
    return (float)x/8191.0*getGSense();
}
float BMA180::getYValFloat()
{
    // normalize (if x is maximum (8191) and GSENSE=1.0 then 1.0
    return (float)y/8191.0*getGSense();
}
float BMA180::getZValFloat()
{
    // normalize (if x is maximum (8191) and GSENSE=1.0 then 1.0
    return (float)z/8191.0*getGSense();
}

int BMA180::getRegValue(int adr)
{
    int val;
  Wire.beginTransmission(address);
  Wire.write(adr);
  Wire.endTransmission();
  Wire.requestFrom((int)address, 1);
  if (Wire.available()==1)
  {
    val = Wire.read();
  }
  else val=-1;
  int result = Wire.endTransmission();
  checkResult(result);
  return val;
}

void BMA180::setRegValue(int regAdr, int val, int maskPreserve)
{
    int preserve=getRegValue(regAdr);
    int orgval=preserve & maskPreserve;
    Wire.beginTransmission(address);
    Wire.write(regAdr);
    Wire.write(orgval|val);
    int result = Wire.endTransmission();
    checkResult(result);
   
}

void BMA180::setGSensitivty(GSENSITIVITY maxg) //1, 1.5 2 3 4 8 16
{
    setRegValue(0x35,maxg<<1,0xF1);
}

void BMA180::SetFilter(FILTER f) // 10,20,40,75,150,300,600,1200, HP 1HZ,BP 0.2-300, higher values not authorized
{
    setRegValue(0x20,f<<4,0x0F);
}

void BMA180::SetISRMode() // you must provide a ISR function on the pin selected (pin 2 or 3,. so INT0 or INT1)
{
    setRegValue(0x21,2,0xFD);
}

void BMA180::SoftReset() // all values will be default
{
    setRegValue(0x10,0xB6,0);
    delay(100);
}

void BMA180::SetSMPSkip()
{
    setRegValue(0x35, 1, 0xFE);
}

int BMA180::getIDs(int *id, int *version)
{      
  Wire.beginTransmission(address);
  Wire.write(0);
  Wire.endTransmission();
  Wire.requestFrom((int)address, 2);
  if (Wire.available()==2)
  {
    *id = Wire.read();
    *version= Wire.read();
  }
  else *id=-1;
  int result = Wire.endTransmission();
  checkResult(result);
  return *id!=-1;
}


void BMA180::enableWrite()
{
    //ctrl_reg1 register set ee_w bit to enable writing to regs.
    setRegValue(0x0D,0x10,~0x10);
    delay(10);
}


void BMA180::disableWrite()
{
    setRegValue(0x0D,0x0,~0x10);
    delay(10);
}

bool BMA180::checkResult(int result)
{
	  if(result >= 1)
	  	return false;
	  return true;
}
Wire.write(0);

Common bug. Change this line to:

Wire.write((byte)0);

and it should compile.

Wow, thank you for replying but now is the MPU60X0 that gives me so much errors like that:
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'void MPU60X0::initialize()':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:69: error: 'SPI' was not declared in this scope
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'uint8_t MPU60X0::getAuxVDDIOLevel()':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:100: error: invalid conversion from 'int' to 'uint8_t*'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:100: error: initializing argument 4 of 'static int8_t I2Cdev::readBit(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:100: error: invalid conversion from 'uint8_t*' to 'uint16_t'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:100: error: initializing argument 5 of 'static int8_t I2Cdev::readBit(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'void MPU60X0::setAuxVDDIOLevel(uint8_t)':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:110: error: no matching function for call to 'I2Cdev::writeBit(bool&, uint8_t&, int, int, uint8_t&)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\I2Cdev/I2Cdev.h:91: note: candidates are: static bool I2Cdev::writeBit(uint8_t, uint8_t, uint8_t, uint8_t)
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'uint8_t MPU60X0::getRate()':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:137: error: invalid conversion from 'int' to 'uint8_t*'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:137: error: initializing argument 3 of 'static int8_t I2Cdev::readByte(uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:137: error: invalid conversion from 'uint8_t*' to 'uint16_t'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:137: error: initializing argument 4 of 'static int8_t I2Cdev::readByte(uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'void MPU60X0::setRate(uint8_t)':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:146: error: no matching function for call to 'I2Cdev::writeByte(bool&, uint8_t&, int, uint8_t&)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\I2Cdev/I2Cdev.h:95: note: candidates are: static bool I2Cdev::writeByte(uint8_t, uint8_t, uint8_t)
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'uint8_t MPU60X0::getExternalFrameSync()':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:179: error: invalid conversion from 'int' to 'uint8_t*'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:179: error: initializing argument 5 of 'static int8_t I2Cdev::readBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:179: error: invalid conversion from 'uint8_t*' to 'uint16_t'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:179: error: initializing argument 6 of 'static int8_t I2Cdev::readBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'void MPU60X0::setExternalFrameSync(uint8_t)':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:188: error: no matching function for call to 'I2Cdev::writeBits(bool&, uint8_t&, int, int, int, uint8_t&)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\I2Cdev/I2Cdev.h:93: note: candidates are: static bool I2Cdev::writeBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'uint8_t MPU60X0::getDLPFMode()':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:219: error: invalid conversion from 'int' to 'uint8_t*'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:219: error: initializing argument 5 of 'static int8_t I2Cdev::readBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:219: error: invalid conversion from 'uint8_t*' to 'uint16_t'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:219: error: initializing argument 6 of 'static int8_t I2Cdev::readBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'void MPU60X0::setDLPFMode(uint8_t)':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:231: error: no matching function for call to 'I2Cdev::writeBits(bool&, uint8_t&, int, int, int, uint8_t&)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\I2Cdev/I2Cdev.h:93: note: candidates are: static bool I2Cdev::writeBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'uint8_t MPU60X0::getFullScaleGyroRange()':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:254: error: invalid conversion from 'int' to 'uint8_t*'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:254: error: initializing argument 5 of 'static int8_t I2Cdev::readBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:254: error: invalid conversion from 'uint8_t*' to 'uint16_t'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:254: error: initializing argument 6 of 'static int8_t I2Cdev::readBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'void MPU60X0::setFullScaleGyroRange(uint8_t)':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:266: error: no matching function for call to 'I2Cdev::writeBits(bool&, uint8_t&, int, int, int, uint8_t&)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\I2Cdev/I2Cdev.h:93: note: candidates are: static bool I2Cdev::writeBits(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'bool MPU60X0::getAccelXSelfTest()':
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:276: error: invalid conversion from 'int' to 'uint8_t*'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:276: error: initializing argument 4 of 'static int8_t I2Cdev::readBit(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:276: error: invalid conversion from 'uint8_t*' to 'uint16_t'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp:276: error: initializing argument 5 of 'static int8_t I2Cdev::readBit(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)'
C:\Users\Bran\Desktop\ARDUINO\Programas\arduino-1.0.6\libraries\MPU60X0\MPU60X0.cpp: In member function 'void MPU60X0::setAccelXSelfTest(bool)':

Well, look at what it is complaining about. Now it is complaining about a different library. The MPU60X0 library.

And that library appears to have a lot of errors in it. Seems like there is a lot of functions trying to use pointers when they need to use numbers or vice versa.