Cross-platform reading of a text file into Arduino

So, quick background, I'm just capable enough on Arduino to get myself into trouble, and used to program Visual Basic, but it's been a good 10-15 years or so.

I'm trying to find the simplest cross-platform (Mac and Windows) way to have a plain text file with, say, eight strings, separated by line breaks or commas, and send those to an Arduino over USB to be stored as variables in EEPROM so that they're non-volatile.

Is there a way to do this in a browser, or some other simple cross-platform way? I would love to be able to just have a web page that you could type in the eight values, connect the Arduino, and hit a button to upload those to the Arduino.

The idea is that I'd program my little Arduino beast to send a different serial message out (MIDI, actually) when a different button on it is pressed, and I want to provide an easy way for the end user to program their own messages for it, ideally with minimal configuration on their end.

Possible, or pipe dream?

Thanks, Andy

Certainly doable.

I personally would attack the problem by making the input/store program run on the arduino, so that the only application needed by the host is a terminal application. That way it would even be configurable with a VT100 terminal, if you happen to have one of those around. (:


Web page is a good idea, but you'll need an ethernet module, etc... too complicated. Just do a little Java application with Processing. With a small GUI to enter the numbers, you can save and load the textfile + send the values to the Arduino via serial.

Your arduino code should look something like this:

void readFromSerialPort()
  // REM: need to know the address where to write the incoming bytes;
  if (Serial.available() > 0)
      int incomingByte =;

      // adapted from;

For testing purposes, as the sending app, you can use the serial console from the arduino IDE.

Here's a crazy thought...

Is there a way to get the Arduino to let you use the EEPROM as a USB drive? If I could figure out a way to just connect it to the computer via USB, drag a text file(s) with the variables in it, and then read that from the program, that would be perfect.

I could do the same thing with an SD card and an external reader to write the card, but I'd love to do it all self-contained, and ideally avoiding the need for the SD card/other external memory.

No you can't do that. Arduino is not a USB host.

Your only choice is to somehow use the serial line, or as you suggest yourself something like an SD card.