I want to use RedBear Blend micro for my project.
Blynk would help me a lot and it is going to be my favorite.
But when I compile the example BLE_RedBearLab _BlendMicro than it will use about 90% of storage.
So there is very less storage to do my own stuff.
I will need only 2 or 3 virtual pins to control one stepper Motor and a row of led ws2812b
My question is how can I eliminate the overhead which might be unused for my project.
Any tip’s would be welcome
- Put on the top of your sketch:
#define BLYNK_NO_BUILTIN // Disable built-in analog & digital pin operations
#define BLYNK_NO_FLOAT // Disable float operations
Hope that helps!
@vshymanskyy please add this to docs.
Thank you for your fast response.
I tested it as suggested.
Original uses 27.332 Bytes (95%)
as sugested 25.182 Bytes (87%)
So it is not so much I hop it will help.
By the way one more question
Is it allowed to use interrupt while blynk is running ?
Timer1.initialize(1000); // set a timer of length 1000 microseconds (or 0.001 sec - or 1kHz
Timer1.attachInterrupt( my_timer ); // attach the service routine here
For me it’s different.
The original Blynk example:
Sketch uses 24,936 bytes (86%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,725 bytes (67%) of dynamic memory, leaving 835 bytes for local variables. Maximum is 2,560 bytes.
Sketch uses 22,754 bytes (79%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,705 bytes (66%) of dynamic memory, leaving 855 bytes for local variables. Maximum is 2,560 bytes.
Probably you’re talking about your full sketch, then it is a good improvement!
for interrupts - yes you may use them, but be sure you understand what you’re doing