Help with Serial.write

Hello,
I am writing my first significant arduino sketch and am running into an unexpected compilation error which I suspect is caused by something I am missing.

I would like to write a buffer of binary data to the serial port using Serial.write( buff, byteCount);

Whenever I use write in its various forms, I get the compilation error
"class hardwareSerial has no member named write"

For includes, my sketch references Stdio.h and OneWire.h. I've also added Stdlib.h, but no luck. When I investigated the HardwareSerial lib's H file, sure enough, there is no write member function.

I have seen other code on the forum that uses Serial.write, but I can't find anything that looks like I have left out. All my other uses of Serial functions work as expected.

Hopefully there is a more fundamental problem - like I've missed some area of information that I need to read up on.

Thanks for any help,
Tom Harper

p.s. write is color-coded like the other functions e.g. Serial.print, so capitalization, etc. must be correct. Serial.Write does not get color coded correctly.

write() takes a single argument, which is an unsigned byte.

-j

THanks Kg,
I have a few more questions since I cannot get the following code snippet to work. I am sorry for asking a god member for clarification...

The following code snippet generates the "has no member function error for either call to Serial.write.:

void SerialWriteTest(){
byte val = 3;
float incorrectParameter = 0.7;

/* Both of the following calls generate the compilation error
In function 'void SerialWriteTest()':
error: 'class HardwareSerial' has no member named 'write'
*/
Serial.write(val);
//Serial.write((uint8_t)val);

/* When uncommented, the following bad call generates the error:
error: no matching function for call to
HardwareSerial:print(byte&, int, float&)
*/
//Serial.print( val, BYTE, incorrectParameter );
}

I believe I have created a similar problem you describe as my initial error with the incorrect call to Serial.print above. The compilation error indicates that the call to print does not have a form taking 3 parameters, rather than a 'class member not found' error.

I think the calls to Serial.write meet the criteria you suggest. According to the online reference, the data type 'byte' is an unsigned 8-bit value. Again, both calls get the 'member not found' error rather than a parameter data type error or a nonexistent function overload signature.

One more question - the online reference shows the following forms for calls to Serial.write:

Syntax

serial.write(val)
serial.write(str)
serial.write(buf, len)

Parameters

val: a value to send as a single byte

str: a string to send as a series of bytes

buf: an array to send as a series of bytes

len: the length of the buffer

Are there cases when the online documentation does not reflect what folks have had time to implement? Note that I am not implicitly complaining. I am amazed at what the ardiuno community has accomplished and understand situations like this if that is the case. I hope some day to know enough to give back some...

Oh, I think I have the most recent download of the dev environment - arduino 0010 Alpha is what my about box says.

0010 is way behind - 16 is the current release, and 17 is imminent. That's probably the issue, as the online documentation should match 0016.

-j

WOops! Yes, I thought I had downloaded the latest and greatest. Sorry about that. THanks for the help. 0016 solved my issue.