no matching function for call to 'Serial_::write(byte [2],int)'

I downloaded the Razor IMU source code (https://dev.qu.tu-berlin.de/attachments/download/1226/Razor%20AHRS%20Firmware%20and%20Test%20Sketch%20v1.4.1.zip) last night from Razor AHRS. This code uses exactly the sensors I need and would solve the problem I have currently (I hope). The only problem is that on line 535 in "Razor AHRS v1.4.1\Arduino\Razor_AHRS\Razor_AHRS.pde" in the above linked zip file they have:

Serial.write(id, 2);

When I Verify, compilation fails at this line with the following error:

no matching function for call to 'Serial_::write(byte [2],int)'

I downloaded and installed Arduino 1.0.2 on a new pc and installed the drivers to Arduino Pro Micro 16MHz/5V.

I checked the arduino documentation on Serial.write (Serial.write() - Arduino Reference) and it seems to be a valid command.

What am I doing wrong?

Does this help...

Serial.write( (const uint8_t*)(&id[0]), 2 );

Does this help...

Code:

Serial.write( (const uint8_t*)(&id[0]), 2 );

No, this made no difference: new error:

no matching function for call to 'Serial_::write(const uint8_t*, int)'

In the cast, try changing uint8_t to char.

PaulS:
In the cast, try changing uint8_t to char.

Nah, the prototype is

    virtual size_t write(const uint8_t *buffer, size_t size);

I think the problem is that it's 'Serial_' rather than 'Seriral'

After I uncomment one of the "build options" it compiles fine for me. I'd suggest redownloading the IDE.

Hello and welcome,

Try replace:

byte id[2];
id[0] = readChar();
id[1] = readChar();
...
Serial.write(id, 2);
Serial.println();

by:

char id[3];
id[0] = readChar();
id[1] = readChar();
id[2] = '\0';
...
Serial.println(id);