analoReference(INTERNAL) error. why says it was not declared in the scope.

Hi, I am using a Arduino Due to do a project, this is a part of code from MIT, I do not know why it not works on Due, please help me. Thanks in advance.
Do I need to connect any Pin before upload code?
I am very new to Arduino. Thanks again.

// create current read function:
float currentRead(){
analogReference(INTERNAL);
float currentReadingmA = ((float)analogRead(iMeter) / 1023.0 * 1.1 - 0.15) * 123.7;
analogReference(DEFAULT);
return currentReadingmA;
}

Here is the error
Arduino: 1.5.5-r2 (Windows 7), Board: "Arduino Due (Programming Port)"

IVy_arduino.ino: In function 'float currentRead()':
IVy_arduino:177: error: 'INTERNAL1v1' was not declared in this scope
IVy_arduino:179: error: invalid conversion from 'int' to 'eAnalogReference'
IVy_arduino:179: error: initializing argument 1 of 'void analogReference(eAnalogReference)'

Even i tried same thing didnt worked.
If you are using 5v as reference then no necessary to use it

Check this before Using.

DEFAULT: the default analog reference of 5 volts (on 5V Arduino boards) or 3.3 volts (on 3.3V Arduino boards)
INTERNAL: an built-in reference, equal to 1.1 volts on the ATmega168 or ATmega328 and 2.56 volts on the ATmega8 (not available on the Arduino Mega)
INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only)
INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only)

IVy_arduino:177: error: 'INTERNAL1v1' was not declared in this scope

That is not the same thing as INTERNAL

Post your code of you can't see the error. Use code tags, read the how to use this forum sticky about them.

As already mentioned, you should not use INTERNAL reference unless the voltage being measured does not exceed 1.1 Vdc.

Jz_C:
Hi, I am using a Arduino Due to do a project, this is a part of code from MIT, I do not know why it not works on Due, please help me. Thanks in advance.

...

analogReference(INTERNAL);
...



[/quote]

See:

http://arduino.cc/en/Main/arduinoBoardDue



> The analogReference() function **is ignored** on the Due.