WeatherDuino Forum

Full Version: Tx software error on compile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have assembled board Tx1 with the FO wind and rain sensors and am trying to upload the software to it. I made the changes to config_TX and it errors out with this message. 'Internal' was not declared in this scope.

The following is the entire error message.

Arduino: 1.8.2 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"


C:\Users\Dan\Documents\Arduino\WeatherDuino_Pro2_PLUS_v2.1_20170528\WeatherDuino_Pro2_PLUS\v2.1\software\TX software\WeatherDuino_Pro2_Universal_TX_v3.1_b002\Process_IDx.ino: In function 'void send_SensorID5()':

Process_IDx:363: error: 'INTERNAL' was not declared in this scope

   analogReference(INTERNAL);     // Sets Analog Reference to 1.1V

                   ^

Multiple libraries were found for "EEPROM.h"
 Used: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM
 Not used: C:\Users\Dan\Documents\Arduino\libraries\EEPROM
exit status 1
'INTERNAL' was not declared in this scope

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


First I copied the libraries from C:\Users\Dan\Documents\Arduino\libraries\EEPROM and pasted them to C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM and I tried it again and got the same "'Internal' was not declared in this scope." I then deleted the EEPROM library from C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\ and tried it again and got the same error.

Arduino: 1.8.2 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"


C:\Users\Dan\Documents\Arduino\WeatherDuino_Pro2_PLUS_v2.1_20170528\WeatherDuino_Pro2_PLUS\v2.1\software\TX software\WeatherDuino_Pro2_Universal_TX_v3.1_b002\Process_IDx.ino: In function 'void send_SensorID5()':

Process_IDx:363: error: 'INTERNAL' was not declared in this scope

   analogReference(INTERNAL);     // Sets Analog Reference to 1.1V

                   ^

exit status 1
'INTERNAL' was not declared in this scope

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

When that didn't work I did a search and the person reinstalled IDE so I did that. Unfortunately I got the exact same message. Any insight?
It stopped on this line.

//---------------------------------------------------------
// ID5 - Processing
//---------------------------------------------------------
#if (ID5 == 1)

void send_SensorID5()
{
PacketID = UnitID << 4 | 5; // Hi nibble UnitID, Lo nibble SensorID

analogRead(BatVolt_PIN);
delay(20);
BatVolt = analogRead(BatVolt_PIN);

analogReference(INTERNAL); // Sets Analog Reference to 1.1V <------stopped on this line and it is highlighted red
(03-06-2017, 04:56)danner Wrote: [ -> ]Arduino: 1.8.2 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Hi,

In your Arduino IDE change the board type to Arduino Nano.
You are trying to compile a code written for an Arduino Nano having an Arduino Mega selected.
That worked, thanks! :-)
Smile