How to send text file in pc to arduino?

Hi i am a newbie in arduino..any guidence here can teach me on how to send the text file from pc to arduino?

i am search through google...but it seem likes complicated. Any 1 can guide me?thanks.

I tried using VBS and Gobetwino....but it is complicated for me...really need help here.

the content in my file is a sensor data: X:0012 Y:ffef Z:00ff

how do i read this txt file and send to arduino?

I suggest to use the serial interface. http://arduino.cc/playground/Main/InterfacingWithHardware#Communication

[quote author=Udo Klein link=topic=101310.msg759981#msg759981 date=1334390876] I suggest to use the serial interface. http://arduino.cc/playground/Main/InterfacingWithHardware#Communication [/quote]

hi , thanks for reply, just forgot to mentioned i am using windows...so any method is suit for me?i check on the link all the times since i start my project...but i have no idea on which 1 is suit for me...any more details?thanks

The OS does not really matter. The question is which programming language you want to use on your PC. Choose whatever you prefer and learn to use the serial interface in the language of your choice. I would choose either C# or Python depending on what I am after. Your preferences might be different. http://arduino.cc/playground/Main/InterfacingWithSoftware

[quote author=Udo Klein link=topic=101310.msg759992#msg759992 date=1334392483] The OS does not really matter. The question is which programming language you want to use on your PC. Choose whatever you prefer and learn to use the serial interface in the language of your choice. I would choose either C# or Python depending on what I am after. Your preferences might be different. http://arduino.cc/playground/Main/InterfacingWithSoftware [/quote]

From your words, is that mean that i need to use another language to work on this?it cant works only if only using ARDUINO IDE? Lets say i choose C#...may i know where can i get the sample code of related project??thanks....

Don't know GoBetwino, but when I look here: http://arduino.cc/playground/Interfacing/GoBetwino I see in the list what we can do with it: "Read a file and return data to Arduino." Aren't there any examples in the package? (I've not downloaded it). Perhaps Processing will help? http://www.processing.org, too.

best regards Andreas

If you want to automatically transmit it this is the way to go. If you want to copy it manually you could use the serial monitor. If you are satisfied to transmit it statically you could compile it into your program. Until you explain clearly what you want to achieve more specific advice is close to impossible.

Maybe the GoBetwino will fit you bill but unless you get more specific nobody can tell you.

danimath: Don't know GoBetwino, but when I look here: http://arduino.cc/playground/Interfacing/GoBetwino I see in the list what we can do with it: "Read a file and return data to Arduino." AreN#t there any examples in the package? (I've not downloaded it). Perhaps Processing will help? http://www.processing.org, too.

best regards Andreas

Hi Andreas...thanks for your info. I am not using processing before so i just scare will make this become complicated...is it suitable for my case?if yes then i probably will work on this....about gobetwino...i cant find any examples through their blog...so this make me struggling....anyway thanks

[quote author=Udo Klein link=topic=101310.msg759996#msg759996 date=1334393120] If you want to automatically transmit it this is the way to go. If you want to copy it manually you could use the serial monitor. If you are satisfied to transmit it statically you could compile it into your program. Until you explain clearly what you want to achieve more specific advice is close to impossible.

Maybe the GoBetwino will fit you bill but unless you get more specific nobody can tell you. [/quote]

Now i am just a beginner to face with whatever i am working on. These kind of stuff is strange for me...so i need some example to start...after searching the information that you provided...it is seem like less what i had found regarding to my case....so to read a txt file and send to arduino, is this necessary to use another software to do it? cant just use arduino code?

In the GoBetwino download there's a PDF file describing the sample code that also comes with the download.

In there you can see how your Arduino program can ask GoBetwino to send over a line from a text file.

MikMo: In the GoBetwino download there's a PDF file describing the sample code that also comes with the download.

In there you can see how your Arduino program can ask GoBetwino to send over a line from a text file.

have u ever used it?i checked on this software already. I read that it is not fully tested for windows 7...just wondering how to use to send the text file to arduino....

I made it :)

You can not use it to send a text file as a whole unit to Arduino, but you can use it to send a line at a time from a text file.

Check the documentation page 26.

MikMo:
I made it :slight_smile:

You can not use it to send a text file as a whole unit to Arduino, but you can use it to send a line at a time from a text file.

Check the documentation page 26.

Hi i also done it with given downloadtest.pde in sample folder…able to print it at the gobetwino …but i have to store it into a variable for further calculation…is it possble"??
for example in a line i have : x:ff22 y:f00ef z:ff23

can i stored a = ff22, b= 00ef c=ff23? can i make something like this???
Let’s say i have 100 lines with different value…

Can any1 help me out??really appreciate thanks.

Can any1 help me out??really appreciate thanks.

It might be good to Explain the big picture on what you are trying to do. With windows you can send a file to the com port using a simple batch file like below.

type hotpix.jpg >com5

zoomkat:

Can any1 help me out??really appreciate thanks.

It might be good to Explain the big picture on what you are trying to do. With windows you can send a file to the com port using a simple batch file like below.

type hotpix.jpg >com5

ok basically i am using a eval board of adxl345 sensor. I can stored the value to a txt file in my PC. Then i have to send the data in the txt file to arduino to control a servo motor. So since the data is read line by line in each line as i describe previously. How i going to stored each axis value to a variable?

Why not connect the eval board directly with the Arduino thus leaving the PC out of the loop?

[quote author=Udo Klein link=topic=101310.msg760836#msg760836 date=1334477495] Why not connect the eval board directly with the Arduino thus leaving the PC out of the loop? [/quote] This is the step that i tried at the beginning. At the first sight i receive the project (Eval board adxl345 + arduino Uno) i am just planning to connect both without pc. But regarding to my previous post: http://arduino.cc/forum/index.php/topic,97346.0.html

Mr.johnwasser suggested that my eval board is not suitable to connect direct to arduino since the pin mapping in the eval board already used up for another purpose. The only 1 possible way is using USB direct connect to arduino uno. But i faced another problem that arduino cant even been activated (maybe not recognize the eval board) when i connect directly Uno to eval board. For example, a simple code Serial.write("7"). Suppose the Tx led on Uno will be light up if data sent. But when i connect it to eval board. It is no light up at all. The data cant sent.

So i try another way, save the data to a text file and then transfer it to arduino. PC as intermediate medium. I really hope that i could find someone to help me out to hear my problem....

Sorry for my english if anywhere make you trouble to read this. Thanks

The eval board has a pair of serial pins. Can you not make use of those?

dxw00d: The eval board has a pair of serial pins. Can you not make use of those?

HI thanks for ur replied. I tried make use of those TX and RX at the eval board as well. I try before to declare the pin at arduino RX to receive the input from TX on Eval board but the reading is something just like a current electric value, not the position value for those 3 axis. From the beginning till now, i search through many information about this eval board but it is less. So i do hope that can discuss with you all here.

Thanks for you all spending your time here.

but the reading is something just like a current electric value, not the position value for those 3 axis

But i faced another problem that arduino cant even been activated (maybe not recognize the eval board) when i connect directly Uno to eval board. For example, a simple code Serial.write("7"). Suppose the Tx led on Uno will be light up if data sent. But when i connect it to eval board. It is no light up at all.

In the light of all those quoted statements(it's been a hard time understanding all that :fearful: XD) i think you are not using the serial tx/rx uart ports and going to this method of posting in a text file because you can't get the whole values from the accelerometer (adxl) which are like 355, 456 and you are getting single values '7' ? is this the problem ? then ustilising the packet's will solve it.