arduino / cloud-examples

Examples for Arduino Cloud
11 stars 4 forks source link

Example to big to run on Arduino Leonardo #2

Open lorenzoromagnoli opened 8 years ago

lorenzoromagnoli commented 8 years ago

I tried running this example on an Arduino Leonardo + wifishield and it can't compile. The program size exceed the Arduino Leonardo storage space. Is there a way to make the library a little smaller?

screen shot 2016-01-09 at 18 05 27
sandeepmistry commented 8 years ago

@lorenzoromagnoli I tried to remove some Serial.println's from setupWiFi, which made the sketch size was 28,820 bytes, which is still too big.

@cmaglie any other ideas? This is the sketch: https://github.com/arduino/cloud-examples/blob/master/mqtt/mqtt_send_digital/mqtt_send_digital.ino

cmaglie commented 8 years ago

can you share the updated sketch on a gist?

sandeepmistry commented 8 years ago

Yes, https://gist.github.com/sandeepmistry/fbb5d161ddce1e51ee83

cmaglie commented 8 years ago

Since we are really nearing the limit, probably removing some more messages may allow to gain the hundred bytes needed to make the sketch fit, BTW the Leonardo it's not a good board to be used with the WiFi101 combined with this PubSub library (due to memory requirements), maybe you should try a Zero+WiFi101 or a MKR1000 when available. Alternatively a more lightweight PubSub library should be found (but again I don't know how easy is this).