Pages: [1] 2   Go Down
Author Topic: How to send text file in pc to arduino?  (Read 1518 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3480
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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
Logged

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3480
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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....
Logged

Hannover, Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: April 15, 2012, 03:29:48 am by danimath » Logged

http://danimathblog.blogspot.com

#define true '/'/'/'
#define false '-'-'-'

0
Offline Offline
Faraday Member
**
Karma: 23
Posts: 3480
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

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?
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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....
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I made it   smiley

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.

« Last Edit: April 14, 2012, 08:27:12 am by MikMo » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I made it   smiley

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.
Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Code:
type hotpix.jpg >com5
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Code:
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?
Logged

Pages: [1] 2   Go Up
Jump to: