Compiling Problem

I got this code from the internet but when i compile it it gives me this error :

Arduino: 1.5.8 (Windows 8), Board: "Arduino Due (Programming Port)"

sketch_oct11a.ino: In function 'void setup()':
sketch_oct11a.ino:11:19: error: 'INTERNAL' was not declared in this scope
sketch_oct11a.ino: In function 'void loop()':
sketch_oct11a.ino:20:23: error: 'BYTE' was not declared in this scope
Error compiling.

This is the code :

 #define ANALOG_IN 0
  
  void setup() {

    Serial.begin(19200);

    analogReference(INTERNAL);

  }

void loop() {

  int val = analogRead(ANALOG_IN);

  Serial.print( 0xff, BYTE);

  Serial.print( (val >> 8) & 0xff, BYTE);

  Serial.print( val & 0xff, BYTE);

}

I have a DUE R3 Windows 8.. I am new to this and i also wondered what was the function of the BYTE?? See that it is the cause of my problems!! Please Help

I think that on the DUE you have a choice of internal references, so INTERNAL is not supported. Instead you select EITHER
INTERNAL1V1 OR INTERNAL2V45

The word BYTE is no longer supported. Instead use Serial.write

Try it with the following mods.

 #define ANALOG_IN 0
  
  void setup() {

    Serial.begin(19200);

    analogReference(INTERNAL1V1);   // Equivalent to INTERNAL 1.1 volts

   // analogReference(INTERNAL2V56); //<< or this for 2.56 volts

  }

void loop() {

  int val = analogRead(ANALOG_IN);

  Serial.write( 0xff);

  Serial.write( (val >> 8) & 0xff);

  Serial.write( val & 0xff);

}