reading "config file" from PC

Hello, I use the EEPROM part of the micro-controleur for the configuration of the Arduino software. I do a software with the terminal as HMI for writing the configuration to the EEPROM.

I just want to know if it is possible to read a PC file from the IDE.

If it is possible I would like to read a configuration file from the PC and just writ it to the Arduino / EEprom part.

Any help will be welcome.

Best regards

Thierry

I just want to know if it is possible to read a PC file from the IDE.

When? When a sketch is opened for editing? That happens all the time?

When the sketch is compiled? That's what #include is for.

When the compiled code is executed on the Arduino? No. The IDE does not talk to the Arduino when the Arduino is running. The Serial Monitor application might. It can't send data from a file, though.

You could write an application that opens the serial port that the Arduino is connected to, and read, and send the contents of, a file.

A rough method would be to issue a "copy con >com8:" (or whatever com port your arduino appears on) from the command prompt. Then your arduino can use Serial.println to send dos commands (such as "type config.txt") then read the resulting data coming back with Serial.reads.

There are better ways of achieving this though.

Edit. You'd also have to setup the baud rate etc.. before the copy con command (using mode perhaps)