henri98 / LoRaWAN-Weather-Station

Small LoRa based Weather station. The weather station contains a temperature sensor, air pressure sensor and humidity sensor. The data is read out and sent to Cayenne Mydevices and Weather Underground using LoRa and The Things Network.
https://www.instructables.com/id/LoRaWan-Weather-Station/
GNU General Public License v3.0
45 stars 14 forks source link

Compiling code for Arduino Pro or Pro Mini #2

Closed pandrews255 closed 6 years ago

pandrews255 commented 6 years ago

I'm sure it's something that I'm doing wrong, but it seems this code is too big for a pro mini 328.

Error: Sketch uses 35516 bytes (115%) of program storage space. Maximum is 30720 bytes. Global variables use 1264 bytes (61%) of dynamic memory, leaving 784 bytes for local variables. Maximum is 2048 bytes. Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it. Error compiling for board Arduino Pro or Pro Mini.

Attached is how my Arduino program is setup. untitled

pandrews255 commented 6 years ago

Since you're using Atom, I thought I'd give it a try also and after installing that, it looks like I'm getting a similar error:

Error: The program size (29232 bytes) is greater than maximum allowed (28672 bytes) *** [.pioenvs/sparkfun_promicro16/firmware.elf] Explicit exit, status 1

I think after a little google action, the issue is a 2048 byte difference between the Pro Mini (Maximum 30720 bytes) and the Pro Micro (Maximum 28672 bytes)... Time to get cutting.

pandrews255 commented 6 years ago

Also this: https://www.thethingsnetwork.org/forum/t/full-arduino-mini-lorawan-and-1-3ua-sleep-mode/8059/38

wrong version of the lmic. Delete the one you use and go grab the one from here: https://github.com/matthijskooijman/arduino-lmic

henri98 commented 6 years ago

Mmm its strange!

henri98 commented 6 years ago

I will give it a try for you