Problem including Ethernet.h - out of SRAM ?

Hi,

I’m trying to create a program that supervises my electric consumption. I manage to get information from my power consumption meter and to store it on a SD card. Now I want to forward the consumption data to my webserver through my Ethernet network.
Now I encounter problem while including Ethernet.h library to my project. I think I’m running out of SRAM again.

Is there a way to identify the level of used memory?

How can I optimize my code to allow me to include Ethernet.h library? Is there some programming rules to optimize my developments?

Moute

Is there a way to identify the level of used memory?

Yes, and if you'd tried searching, you'd have found it.

How can I optimize my code to allow me to include Ethernet.h library?

Don't do anything you don't need to do. If you want more help than that, post your code.

Is there some programming rules to optimize my developments?

Don't use Strings. Use the F() macro wherever you can. Get a bigger Arduino.

If you're on an uno then once you include SD and Ethernet libraries there's not much room left for code. I've had to step up to my mega if I really wanted to do anything useful and include both of those.

Sorry, I forgot to post my code.

Delta_G you're right, I'm on a Arduino UNO. So I have to buy an arduino Mega if I want to continue my project.

Thanks

Moute

So I have to buy an arduino Mega if I want to continue my project.

Or scale your expectations. Or, show us your code. There may be ways to reduce your use of SRAM. In fact, there almost certainly are.