Hi , I'm learning arduino code and I tried to compile this code from

Hi , I’m learning arduino code and I tried to compile this code from this link but I’ve got some errors that I don’t know how to fix.
http://r3dstar.co.uk/?p=264

Without telling us what errors you’re getting, I can’t offer much in the way of advice. Copy/paste the errors that you’re getting into http://pastebin.com and add the link here so I can see what errors you’re getting.

Also - what are you using, an Arduino Leonardo, or something else?

Sorry , I’ve got this errors: http://pastebin.com/i7LXEmX1
I’m using arduino uno and i updated the fastled library from https://github.com/FastLED/FastLED

So I was able to get it building using the code that I pasted here - https://gist.github.com/focalintent/17430c45a9ca4d19e979

I made three changes from the code as downloaded from the link you gave me:

  • Change the include to #include"FastLED.h"
  • add a type definition for prog_char (the “typedef const char prog_char;” line)
  • add a type definition for prog_uint16_t (the “typedef const uint16_t prog_uint16_t;” line)

Once I did those things, it built. However, it turns out that it builds to 37.5k which is too large for the Arduino UNO (it can only take programs up to 32k).

Which means you need to clear out at least 5k worth of code, or switch to something with more flash, like the Arduino Mega.

Some things that are eating up a lot of memory (the top 20):

myChars 2016 bytes
bmpDraw 1178 bytes
showStillText 958 bytes
DhcpClass::parseDHCPResponse 934 bytes
ClocklessController< 896 bytes
SdFile::write 830 bytes
updateScroll 824 bytes
loop 820 bytes
DhcpClass::request_DHCP_lease 774 bytes
DNSClient::ProcessResponse 710 bytes
DhcpClass::send_DHCP_MESSAGE 562 bytes
SdVolume::allocContiguous 554 bytes
SdVolume::init 552 bytes
setup 528 bytes
SdFile::read 528 bytes
SdFile::open 458 bytes
snake 442 bytes
Sd2Card::init 390 bytes
droplets 368 bytes
SdFile::truncate 368 bytes

It looks like the myChars array, the bmpDraw and showStillText functions are using up the largest blocks. A bunch of stuff seems to be getting eaten up by the Ethernet library and the SD library as well.

Also - the program as written wants to use 2489 bytes of ram, but the arduino only has 2000 bytes.

If I strip out the ethernet stuff, then the program size goes down to 27k (yay! small enough to fit), however, it still wants 2166 bytes of RAM, which is still over 2000 bytes.

Trying to build this stripping out the SD library results in too many things to try to fix to get it to compile, which I don’t have time for.

I’d strongly recommend starting with a smaller set of code (one of the library examples, etc…) for learning. This piece of code is very very large, fairly complex, does a lot of things all at once (not just LED programming but also networking work as well as juggling data from an SD card and graphics stuff like text processing as well).

This is more of a jumping off into the deep end thing - this code needs so much work in order to be usable on an arduino uno it’s not even funny.

So - to summarize - this program is too big to use on an Arduino UNO - I would recommend using it on an Arduino MEGA if you really want to use this code. I would also recommend starting smaller to learn your way around arduino, programming, FastLED, etc…

Thank you so much for your time and your awesome advice , I will try some examples and when I make something fun I will post. Thank you again