Go Down

Topic: BYTE type definition in Print library (Arduino 1.0) (Read 2357 times) previous topic - next topic


I ported a sketch from Arduino 0.22 to Arduino 1.0.
My old skecth uses SoftwareSerial and ultimately Print library to write one byte over serial:
Code: [Select]

The 1.0 version of Print.h library has removed the definition of BYTE type
Code: [Select]
#define BYTE 0
so I got a compilation error. However, the Print library still implements the functionality and I solved the issue replacing BYTE by 0:
Code: [Select]

Any idea why it has been removed?


Yes to be consistant with other classes. you should use Serial.write now where you used Serial.print(n, BYTE) before.


Also, Serial.write() will work in 0022 / 0023 (and earlier, too, I think) so it shouldn't present compatibility problems to switch.

Go Up