"`.text' will not fit in region" How to fix

I am trying to compile a sketch but getting:

".text’ will not fit in region".` The sketch compiles fine without a single one additional statement

float test = mystring.toFloat();

How can I fix this?

Thanks.

That’s just like having a bucket full to the top and have it overflow with the last drop :wink:
You could opt for not adding the last drop or not fill the bucket up to the top in the first place.

We don’t know what you’ve got in your bucket already, so just quoting that one last statement doesn’t really provide the whole picture.

1 Like

Thanks @ScruffR.

Will change to int to save space.

What I actually wanted to convey was that there might be some other code sections you could reduce to buy yourself some room for future additions.

1 Like

Thank you @ScruffR. It is a good lesson to avoid using double whenever possible. In my case, I could not reduce the code size …

Here are some tips for reducing code size:

2 Likes