Go Down

Topic: Arduino with USB Thumb Drive (Read 2184 times) previous topic - next topic

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.

RuggedCircuits

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

I have tried the following:

Serial.print("\n");

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

RuggedCircuits

Perhaps try \r as well?

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

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

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!

Go Up