Go Down

Topic: WiFi Library size - can it be trimmed? (Read 902 times) previous topic - next topic

co_buckfast

I'm using an Uno and just copying and compiling the first Getting Started Example "Scan for available networks" shows 59% program space usage.

I'm worried my complete code will exceed the Uno space.

Does the whole library get compiled into an application?  Can some of the functionality be trimmed out?

I want the WiFi functionality to connect to both a time server and weather server.  I have a graphic display (fonts & bitmaps), some type of data parser for the servers... I'm thinking I'm going to be really pinched for code space.

Curious what might be possible to do to conserve code space.

I like the Uno for the 5V capability as the graphic display is 5V and I don't have to insert any level shifters.

If I go to a 3.3V Arduino, which version would have larger code space and be most like the Uno in programming and board size (and supporting the WiFi101 shield)?

Thanks.

SurfingDude

Hello co_buckfast,

When it was first released the library support for the WiFi 101 had been fully tested only on the Arduino.cc Zero, a 3.3v board. See the note on the bottom of page:
   http://store-usa.arduino.cc/products/asx00001

The Uno has less than 32KB of available flash memory and 2KB of SRAM, which doesn't leave you a lot of room for firmware and data. Contrast with the Zero with 256KB flash and 32KB SRAM.

However, the 41% flash that you have left is a still quite a good amount, and you should get by unless your application code is quite large and uses numerous other libraries. A Wi-Fi stack is a complicated bit of code even though much of the stack is on the WINC1500 chip, so your 59% is the bulk of the bloat.

I'd be more concerned with the untested features, so be prepared for a bit of extra debugging, and you will need to be very careful in the use of SRAM.

Go Up