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?
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.
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.
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 ) 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!
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..
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
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
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!!!!