Dear All,
I am working on a project using an Arduino Uno. My code however uses 99% storage space and is causing stability issues. I have done my best to decrease the size of the code but I am relatively new to Arduino therefore do not know all the tricks.
Could anyone help out with decreasing the program size before I invest in a mega (which is unhandy due to size restrictions).
Thank you very much!
CODE.ino (8.56 KB)
Dear All,
I am working on a project using an Arduino Uno. My code however uses 99% storage space and is causing stability issues. I have done my best to decrease the size of the code but I am relatively new to Arduino therefore do not know all the tricks.
Could anyone help out with decreasing the program size before I invest in a mega (which is unhandy due to size restrictions).
Thank you very much!
CODE.ino (8.56 KB)
Apologies for the two threads, I am new to using the forum 
Thanks for the response, I made the appropriate changes yet the same issue still exists...
Is there another solution?
Thank you very much!
CODE2.ino (11.1 KB)
String dataString = String(linenumber) + String(float(tid)/1000-float(startTid)/1000,1) + "\t " + String(TEMP,1) + "\t " + String(pressure,0) + "\t " + String(altitude,1) + "\t " + String(acc_x) + "\t " + String(acc_y) + "\t " + String(acc_z) + "\t " + String(acc_total) + "\t " + String(m_x,1) + "\t " + String(m_y,1) + "\t " + String(m_z,1) + "\t " + String(m_total,1) + "\t " + String(x) + "\t " + String(y) + "\t " + String(z) + "\t " + String(hum) + "\t " + String(GPSlocationLAT, 6) + "\t " + String(GPSlocationLNG, 6) + "\t" + String(UVindex) + "\t" + String(ldrLux1) + "\t" + String(ldrLux2) + "\t" + String(ldrLux3) + "\t" + String(ldravg);
What everyone else said. Learn to use c strings - nul-terminated arrays of char - and the c string utilities: strcat, strcpy, atoi, etc.