Go Down

Topic: .TXT file from PC to Arduino (Read 7573 times) previous topic - next topic


How to read .txt file from PC with Arduino via Arduino's serial connection?

I have  10 text file in PC;
b1.txt, b2.txt....b10.txt
each of them 64bytes with different data(variable-periodically changing)
I want to transfer these data to Arduino via its usb-serial connection.

Can I use Serial.Write(buf,n) command or program like
HyperTerminal can do it easily?

Please advice
Thanks :)


Aug 29, 2010, 03:15 pm Last Edit: Aug 29, 2010, 03:15 pm by Eight Reason: 1
You could try from the command line (can't remember if this exactly works or not)

C:\>type myfile.txt > com6

where com6 is the name of the com port connected to your Arduino. It doesn't die for me, but I don't have a sketch on there to read the data so it blocks and sits. Can't say whether it works.


I need something like 'Serial Monitor' which can send files too not just characters and numbers that we have to type in it.

Awaiting response


You could write your own program on the PC that shows a form with input fields and a list of files and a send button.Type something and press send. Or select a file and press send. Do whatever is appropriate in the callback for the send button.


I need something like 'Serial Monitor' which can send files too not just characters and numbers that we have to type in it.

Awaiting response

So how do you plan to do "file" handling on the arduino?
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


Folks thanks for your attempts to ans my question!
Meanwhile I found out how to do file transfer(at least .txt file!!)
However it can transfer up to 115200 bits per second(Thats awsome for some ppl  :D ) but I need 6 times more than that  :'(  :'(
I'm trying have a look at FTDI's FT232R chip to see if I can bypass Arduino and receive the data directly from chip!

Will post back soon...


FTDI chip which does all the USB to serial processing supports upto 3Megabaud rate. You can check this out here..

Even Arduino supports the baud rate more than 115200 but in serial monitor they haven't put the option to select more than 115200 so I'm trying look in to it...
will post u soon..


Agreed but at the moment I'm at development stage only  :-[ and I'll
need financial funding before i go in production  :)


Aug 29, 2010, 09:00 pm Last Edit: Aug 29, 2010, 09:01 pm by Osgeld Reason: 1
what financial funding

you can do this from the command prompt using the mode command to set your serial port speed and either type or echo commands to send it out

you could do this with putty, or hyperterm or anything the speed limitation on the arduino IDE is software only, if its not fast enough (i cant imagine why it wouldnt be you will fill the arduino's ram in less than a second) just dont use it


:D guys I've transferred text files from PC to Arduino at 921600bits/sec it's awsome!!!
However I'm bypassing Arduino and outputting data to other MCU. Just got FTDI working without Arduino. He he. I'm trying with 2Mbps now


Can you please post your solution, so other people looking for this don't have to ask the same question?


I'm using following program to write .txt file from PC to arduino.  
Change COM port to one with yours also it works only for COM ports between 1 to 9 only!!!!

I hope this would be helpful!!

Go Up