Pages: [1]   Go Down
Author Topic: Arduino with USB Thumb Drive  (Read 1956 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have everything working except for one thing. When I write my log data to the drive, it appends the text to the right of the previous data. This gives me a single line extending farther and farther to the right. How do I get a new line started for each new entry? Help me please somebody!

-Thanks

By the way, this is a Vinculum VDIP1.
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You have to add a carriage return and/or linefeed to each line (depending which system you're going to read this on).

Instead of writing "This is a line" for example, write out "This is a line\n"

--
The Arduino Drum Machine: MIDI development system with 14-track MIDI drum machine sequencer / groove-box software
Logged

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

I have tried the following:

Serial.print("\n");

but, it doesn't work.....
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps try \r as well?

Code:
Serial.print("\r\n");

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons
Logged

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

Yay! With your help, it now works!

You gave me the command, but it still wasn't working. I realized that I was not adding the characters to my count in the WRF command, so the "\r\n" wasn't getting to the thumb drive. Duh! Thanks again!
Logged

Pages: [1]   Go Up
Jump to: