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.
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)
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.