ISO C++ forbids converting a string constant to 'char*'

Hello,

I am measuring up to 8 temperature sensors simultaneously using an Arduino Nano3 board for a project.
I am using a code written in an earlier project to write the temperature to Excel, but I accidentally reset the board.
I tried to reupload the original code, but it gives the following error message:

warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

This warning refers to the following lines:

   myExcel.writeIndexed("Temperatuur_hoofdhuidkoeling", idx+3, 1,"%date%");    // write %date% (that will be converted in current date) to worksheet
   myExcel.writeIndexed("Temperatuur_hoofdhuidkoeling", idx+3, 2,"%time%");    // write %time% (that will be converted in current time) to worksheet
   myExcel.writeIndexed("Temperatuur_hoofdhuidkoeling", idx+3, 3, idx*10);     // write time to excel (time = index * 10)'

Since I never used Arduino before, I don't really know how to solve this error.
I found several sources saying ''It's just a warning, so you can ignore it'', but then I get:

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x4d
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x57
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x50
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x72
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x6f
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x6f
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x63
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6f
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6c

Does anyone know how to solve this?

Thanks in advance.

PS: Why can't I upload this, if this is the exact code that was already on the board?

are you using the Arduino Excel (former Arduino Excel Commander) library ?

it is indeed just a warning, so that's not what's causing the chalenge. looks like you can't reach your Arduino. make sure no wires are connected on pins 0 and 1

Try uploading the blink program to your arduino as a test

Yes, that’s the one.
The code starts with the following:

#include <rExcel.h>
#include <Wire.h>

double  samples = 0; 
long    idx = 0; //index
int     oneSecondTiming = 1000; //each one second. 
double  sensor_values_NTC[8] = {0,0,0,0,0,0,0,0} ; 

rExcel        myExcel;                    // class for Excel data exchanging

void setup(){
  
  Serial.begin(115200);
  
  analogReference(EXTERNAL);
  // clearing the rx buffer
  myExcel.clearInput();
  
}

So I think the Excel file should be all set.

Try uploading the blink program to your arduino as a test

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x4d

Means the computer can not communicate with the Arduino. Lots of reasons, wrong serial port selected, wrong processor type selected, faulty USB cable, to name but a few.

PS: Why can't I upload this, if this is the exact code that was already on the board?

When the bootloader starts uploading the code, it can't tell what code you have in already. If it can't communicate with your board it can't upload any code.

J-M-L:
Try uploading the blink program to your arduino as a test

I can compile the blink program, but I can not upload it.
This morning the original code worked fine, so I would expect my PC to be able to communicate with the board.

Okay, I believe I didn't change a thing, but it works now, somehow.
Thanks for your help.

good news :slight_smile:

would check the USB cable or if you have a flaky USB connector on the arduino