I2C conflict

Hi all! :slight_smile: I'm new on this forum and I started recently working on Arduino UNO board with the Ethernet Shield.
In my project I use the Ethernet.h library to send data to a PC and the library SPI.h to save the same data on the SD card.
With these library my project works perfectly, like I desire; but when I only add the directive
#include <Wire.h>
to communicate with a DS1307 Real Time Clock, then the program compiles correctly and it loads on the chip, but the program don't save data to SD or send them through ethernet.
I repeat: to the working sketch I only insert the include directive, no instruction.
I think this could be some kind of conflict: does anyone have had the same problem or have an idea on know how to solve it?

It's easy to run out of SRAM. I'd recommend you find one of the many functions that reports available SRAM and see if that number goes down a lot when you add the Wire library.

johnwasser:
It's easy to run out of SRAM. I'd recommend you find one of the many functions that reports available SRAM and see if that number goes down a lot when you add the Wire library.

Hey!! THANKS! I used the last function described at:
http://playground.arduino.cc/Code/AvailableMemory
and deleting some global variables I've been able to include the wire library :slight_smile:
Thank you again!!

Another quick way to save SRAM is change:

Serial.print("String Constant");

to

Serial.print(F("String Constant"));

The F() macro prevents the string constant from being copied to SRAM during initialization. It works with string constants and almost all the .print() and .println() functions (Serial, LCD, client...)

Ok, I'll test it :slight_smile: you are an Arduino guru :smiley: