Pages: [1]   Go Down
Author Topic: Send CSV to Arduino  (Read 474 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,

I'm starting on my first Arduino project. Originally I wanted the arduino to receive a MIDI file through the serial port, decode the MIDI file, extract the drum notes, and output the drum sequence to different digital outputs.

I did some research and realized that it's not an easy task to decode MIDI files on Arduino. I found that it is a lot easier to use a tool like MIDICSV to convert the MIDI file to CSV format on my PC and then send the CSV to the arduino.

So what is a good way to send CSV files to my arduino and store its contents to arrays smiley-confuse?

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16514
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,

I'm starting on my first Arduino project. Originally I wanted the arduino to receive a MIDI file through the serial port, decode the MIDI file, extract the drum notes, and output the drum sequence to different digital outputs.

I did some research and realized that it's not an easy task to decode MIDI files on Arduino. I found that it is a lot easier to use a tool like MIDICSV to convert the MIDI file to CSV format on my PC and then send the CSV to the arduino.

So what is a good way to send CSV files to my arduino and store its contents to arrays smiley-confuse?



Well to the best of my knowledge CSV are simple ascii text files where commas are used to separate the values being sent ( http://8help.osu.edu/1701.html ) and the end of line as a record marker. So as arduino serial commands are designed to read one character at a time, your sketch coding will have the responsibility to test for each new character being received by the arduino and store it into an array while also keeping track of comma characters and end of line characters. Perhaps there is some 3rd party library out there that can process and parse complete record lines for you?

Reply 7 in the following posting seem to describe the major steps your sketch needs to take:
http://arduino.cc/forum/index.php/topic,122955.0.html

Lefty
« Last Edit: November 21, 2012, 08:33:38 pm by retrolefty » Logged

Pages: [1]   Go Up
Jump to: