Go Down

Topic: Just a quick question on logging (Leonardo) (Read 464 times) previous topic - next topic

Kinkikowboi

Hi,

I'm using the Leonardo for my senior project as an implementation of a datalogger.  I did a quick test to see at what rate the Leonardo logged data in excel and I came up with a couple questions.  When sending data to the computer, I realized that various computers logged data at different rates.  Does anyone know what varies the logging rate?  Write speed on the harddrive?  Processor speed?  My partners and I would like to utilize this board with both Mac and PC so if the Leonardo reads at different rates based on the computer (for some odd reason), please let me know!  Thanks!

Krodal

Did you use the serial output via the usb ? or the keyboard emulation.
That serial communication is a software serial port. It is not very fast.
I don't know about different speeds with different computers. Did one have a slow usb 1.1 hub ?

Kinkikowboi

Hi Krodal,

Thanks for replying.  We are currently using keyboard emulation via usb.  We tested on three different computers, the Mac logged the slowest while one PC logged data instantaneously while the other one was significantly faster than the mac.  And when I say log, I mean like seeing data print into Excel and when unplugging the Arduino from the computer, how fast data will stop logging.  All three computers are using 2.0 usb.

Krodal

I don't know what causes that, sorry. I noticed myself that the keyboard emulation is sometimes slower than expected.

You could run a test with a very simple text editor. To see if that is a lot faster.
Perhaps you can let the Arduino (with keyboard emulation) write to a file that can be imported in Excel.

For logging, you could also add a SD card shield, and write the data to a file on the SD card. Afterwards you plug the SD card in the computer to read the data.

Kinkikowboi

I did try with textedit on mac and notepad on PC.  Mac was way slower.  It might be the operating system?  I did multiple google searches and I couldn't find an answer to this problem.  =[

We did think of the SD card because we have used it before in our implementation but we decided against it because it conflicted with our marketing scheme.  =[  Haha, we're complicated.

Go Up