RS485

ERROR please Help me!!

Arduino: 1.5.8 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Build options changed, rebuilding all

SLAVE_RS485.ino: In function 'void sendMSG(byte, byte, byte, byte, byte, byte, byte, byte, byte, byte)':
SLAVE_RS485.ino:153:26: error: 'BYTE' was not declared in this scope
SLAVE_RS485.ino: In function 'void sendACK(byte, byte, byte, byte, byte, byte, byte, byte, byte, byte)':
SLAVE_RS485.ino:185:26: error: 'BYTE' was not declared in this scope
SLAVE_RS485.ino: In function 'void sendNAK(byte, byte, byte, byte, byte, byte, byte, byte, byte, byte)':
SLAVE_RS485.ino:214:26: error: 'BYTE' was not declared in this scope
Ошибка компиляции.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

RS485.zip (3.26 KB)

          Serial.print(0,BYTE);
          Serial.print(address1,BYTE);
          Serial.print(address2,BYTE);
          Serial.print(5,BYTE);
          Serial.print(data_type,BYTE);
          Serial.print(code1,BYTE);
          Serial.print(code2,BYTE);
          Serial.print(Sign,BYTE);

Since BYTE is not defined in this scope, why are you trying to use it? Get rid of all the ,BYTE stuff in your code.

That will, of course, cause other problems that will need to be solved by casting properly.

Serial.print((byte)0);

probably the code is from a pre 1.0 version as I see this in the code

//RS 485
//By Igor Real
//24-06-09

5 years is an eternity in internet time.
replacing the keyword BYTE by HEX might help as that is still supported.