Pages: [1]   Go Down
Author Topic: reading data file  (Read 644 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi

i have a text (.txt) file like below... one value on one line, whose come from a seismograph. this is a little little part of the file, the entire file contain 500 000 line... whose correspond on one day.

...
687.
681.
657.
669.
675.
693.
686.
669.
682.
676.
665.
655.
663.
660.
655.
...

in max/msp i have make a patch to create a formated file like :

int 1 = 687
int 2 = 681
int 3 = 657

but how i can make to simplify the reading and writing ?

next i want to read it like a loop...

if anyone can help me !
thanks
best
f
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

WHAT do you want to read it?  Arduino?  MAX/MSP?  Do you have the data on an SD card?  More details, please.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

hi

he is a Mac textedit file (.txt) whose i have on my computer. i can open it on word or any text application.

with max/msp i have make a 1st try : read the file in max and transmit the value to the arduino, arduino control CCmotor... this run good, but i would like to do my stuff without max & computer... only with an arduino board.
I can copy the file on a SDcard if it's necessary, but actually I just have an arduino UNO, and soon a mega and an ethernet shield.
sure if i can load the file on a sd card and read it on arduino program it's a good way... but how i can do this ? which board/shield can read text file on a sd card ?
can you explain me the process ?

max can also help me to shake up the file on a specify arduino "style"

all in all i don't really show how make to read this kind of file !

If you can enlighten me
best
f
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 46026
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
which board/shield can read text file on a sd card ?
Any board that has the appropriate shield (one that contains an SD card holder) can be programmed to read an SD card.

Quote
can you explain me the process ?
Can you learn to use proper capital letters when required?

There is an SD library delivered with the IDE. It includes examples. Get off your duff and look at them.

Quote
max can also help me to shake up the file on a specify arduino "style"
Yeah, whatever that means.

Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
max can also help me to shake up the file on a specify arduino "style"

"99, I asked you not to shake up the file!"
Logged

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

hi


i show for sdcard reader and for programming it...
thanks...

f
Logged

Pages: [1]   Go Up
Jump to: