'Warning' Problems and inconsistent results

Hi,

I get the following warnings when trying to run some example code from 'Connecting Arduino' by Bob Hammel. It seems code that works one day will not work the next, the results are inconsistent.

If I understood this maybe I could fix it. I am running on a MAC using OSX 10.11.3 but I do have access to a Windows 7 machine.

Warning: platform.txt from core 'Arduino AVR Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core. WARNING: Category '' in library EEPROM is not valid. Setting to 'Uncategorized' WARNING: Category '' in library SPI is not valid. Setting to 'Uncategorized' WARNING: Category '' in library SoftwareSerial is not valid. Setting to 'Uncategorized' WARNING: Category '' in library Wire is not valid. Setting to 'Uncategorized'

Those are warnings, they are not errors, and are not what's causing the problem. They're due to the ever-shifting spec for hardware definitions from version to version - your installed AVR core is from 1.6.5's release (note - the version numbering of the core is not the same as the IDE), but you're using a post 1.6.6 release of the IDE. But this shouldn't be preventing things from working, just putting up nag messages. I would not try to fix this until a non-scary version is released, the Arduino team is on a three-release losing streak atm.

As for your issue, when a failure occurs, a different message will be shown. That is the useful one. Post that.

I guessed the warnings were 'unimportant' but that said, I am spending most of my time trying to get the IDE to work as it is meant to and not developing stuff for the boards. These warnings are while using 1.6.7. I also have 1.0.6 and 1.6.6 installed on the desktop. Many thanks, Andy

Running the same code in 1.0.6 gives 'error compiling' and this text:

core.a(main.cpp.o): In function main': /Users/andypowell/Desktop/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:43: undefined reference toloop'

I am using and Arduino UNO R3 and not doing anything complicated all I need to include is SPI and Ethernet header files, I am starting to think the different versions of the IDE maybe accessing an earlier / later core to what they should do. Is there a version you can recommend, should I uninstall the lot and start again? Andy

Andy207: core.a(main.cpp.o): In function main': /Users/andypowell/Desktop/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:43: undefined reference toloop'

Every Arduino sketch is required to have a function named loop() (and one named setup()). Is that missing from your sketch?

Hi,

No, it is the same code as just brings up warnings on IDE 1.6.7 but compiling errors on 1.0.6. It is example code from the book mentioned.

I want to get into Arduino, it just seems the IDE software is so flakey. I am spending most of my time trying to find a version that just works in a consistent reliable and predictable way.

Thanks, Andy

I don't have the book you mentioned. Could you post your sketch so I can see it?

Hi John,
Within the commented section is my output from this code - when it worked. As I said, these results are inconsistent. The warnings reported earlier in this thread mention a SPI problem which concerns me as the sketch uses SPI. I seem to be getting better results on a PC running Windows 7, but my computer of choice is still MAC running OS El Capitan version 10.11.3

Regards, Andy

/*

  • Connecting Arduino:
  • Programming and Networking with the Ethernet Shield
  • Copyright (c) 2014, Bob Hammell.
  • This code is provided by ConnectingArduino.com on an “AS IS” basis.

SeconEstablishing network connection… OK!
IP Address: 192.168.1.9
Default Gateway: 192.168.1.1
Subnet Mask: 255.255.255.0
DNS Server: 192.168.1.1
*
*/

#include <SPI.h>
#include <Ethernet.h>

byte mac = { 0x00, 0xC3, 0xA2, 0xE6, 0x3D, 0x57 };

void setup() {
//D53 on an Arduino Mega must be an output.
pinMode(53, OUTPUT);

Serial.begin(9600);
while (!Serial);

Serial.print("Establishing network connection… ");

if (Ethernet.begin(mac) == 0) {
Serial.println(“FAILED!”);
}
else {
Serial.println(“OK!”);

Serial.print("IP Address: ");
Serial.println(Ethernet.localIP());

Serial.print("Default Gateway: ");
Serial.println(Ethernet.gatewayIP());

Serial.print("Subnet Mask: ");
Serial.println(Ethernet.subnetMask());

Serial.print("DNS Server: ");
Serial.println(Ethernet.dnsServerIP());
}
}

I don't see a loop() function. Perhaps it is required under 1.0.6 but not under 1.6.7

Add the line "void loop(){}" at the end of your sketch to compile under 1.0.6

The 1.6.7 IDE warnings seem to imply that you have some out-of-date files in your installation. Perhaps he problem is in the Arduino15 folder which does not always get updated. Delete or rename the old "Arduino15" directory and re-install 1.6.x.

On Mac OS X: /Users/(username)/Library/Arduino15

On Windows: C:\Users(username)\AppData\Roaming\Arduino15

On Linux: /home/(username)/.arduino15 (a.k.a. ~/.arduino15)

Worth a try, thank you. I am away for a week now but will let you know how it goes. Ta Andy