0

Lighttemplogger code does not compile
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Lighttemplogger code does not compile

by Gerryatric on Sun Sep 06, 2020 8:17 pm

I downloaded the ligthtemplogger code from the website, however it will not compile.
There seems to be a problem with this line ........// void error(char *str) //.......
if I change the line to ........// void error(const char *str) //.......
it compiles, however I am not skilled enough to know if it will accomplish the same thing.


The arduino IDE throws the following errors.

C:\Users\14036\Desktop\Arduino librarys\Light-and-Temp-logger-master\Light-and-Temp-logger-master\lighttemplogger\lighttemplogger.ino: In function 'void setup()':
C:\Users\14036\Desktop\Arduino librarys\Light-and-Temp-logger-master\Light-and-Temp-logger-master\lighttemplogger\lighttemplogger.ino:74:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
error("Card failed, or not present");
^
C:\Users\14036\Desktop\Arduino librarys\Light-and-Temp-logger-master\Light-and-Temp-logger-master\lighttemplogger\lighttemplogger.ino:91:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
error("couldnt create file");
^
Sketch uses 17322 bytes (53%) of program storage space. Maximum is 32256 bytes.
Global variables use 1268 bytes (61%) of dynamic memory, leaving 780 bytes for local variables. Maximum is 2048 bytes.

Gerryatric
 
Posts: 1
Joined: Sun Sep 06, 2020 7:47 pm

Re: Lighttemplogger code does not compile

by adafruit_support_carter on Tue Sep 08, 2020 12:36 pm

Looks like there have been some changes with the compilation settings to make things a little more strict. The change you made seems correct. I'd say go ahead and upload that and see if works OK.

adafruit_support_carter
 
Posts: 20650
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.