hi,
when compile sketch under ide 1.6.1 kind of warning compiler.
it tells me global variables using 1.741 byte (85%) of dynamic memory, leaving 307 byte local variables.
then in red tells me there stability problem.
looking @ code there not many global variables. take look:
there no other global variable.
i tried decreasing number of items gain few free bytes
i tried use 1 maxbotix variable again tiny gain in free bytes
where waste memory then?
thank all
mic
when compile sketch under ide 1.6.1 kind of warning compiler.
it tells me global variables using 1.741 byte (85%) of dynamic memory, leaving 307 byte local variables.
then in red tells me there stability problem.
looking @ code there not many global variables. take look:
code: [select]
#define topclo 30000 // tempo apertura/chiusure in millisecondi
#define items 30 // numero di misure nella media
#define scricchero 1000 // movimento dx in millisecondi
maxbotix rangesensorpw(sonarpw_pin, maxbotix::pw, maxbotix::lv);
maxbotix rangesensor2pw(sonarpw2_pin, maxbotix::pw, maxbotix::lv);
boolean is_moving=false;
boolean is_open=false;
boolean is_sonar_active=false;
boolean is_panic=false;
boolean inseguimento=false;
boolean logging=false;
boolean spostamento=false;
int distsoglia = 67;
int dist[items];
there no other global variable.
i tried decreasing number of items gain few free bytes
i tried use 1 maxbotix variable again tiny gain in free bytes
where waste memory then?
thank all
mic
libraries? hard tell code snippet.
add:
also when print constant text without using f() macro, copied ram @ startup.
add:
also when print constant text without using f() macro, copied ram @ startup.
Arduino Forum > Using Arduino > Programming Questions > dynamic memory iusse
arduino
Comments
Post a Comment