the following code has a compiler error, which I don't quite understand
int serialArrayOne[] = {1,2,3,4,5,6,7,8};
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.write(serialArrayOne,8);
}
error is:
sketch_jan15a.cpp: In function ‘void loop()’:
sketch_jan15a.cpp:19:32: error: no matching function for call to ‘HardwareSerial::write(int [8], int)’
/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:58:20: note: candidates are: virtual size_t HardwareSerial::write(uint8_t)
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:50:20: note: virtual size_t Print::write(const uint8_t*, size_t)
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:49:12: note: size_t Print::write(const char*)
The manual says
Serial.write(buf, len)
buf: an array to send as a series of bytes
len: the length of the buffer
Anyone care to enlighten me
Cheers
Kim