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