Jump to content
  • 0

Linx and Baud rate


Parggoo

Question

Hello, 

 

I have connected an accelerometer (adxl345) to arduino mega and I read successfully values with labview and linx via i2c protocol. 

Right now I have a sampling rate of 65hz with 115200 baud rate. I want to maximize the sampling frequency,but the baud rate seems to be unable to go any higher of 115200. 

Is there another way to do this without changing my communication protocol (i2c)?

 

thank you in advance 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Hi @Parggoo,

Changing the I2C protocol won't necessarily help. Based on this these two LabVIEW Makerhub links (here and here) that even if you override the baud rate, it will be capped based on your system board, so if the Arduino Mega is capped at 115200 baud (I don't know if that is the case or not) then there isn't much that you can do. What you could try is to use a custom command where you essentially have LabVIEW tell the Arudino Mega to run a function where it (not LabVIEW or LINX) configures and collects data from the accelerometer and then sends a flag back to LabVIEW saying the data collection is completed, allowing LabVIEW to just run a while loop waiting for the flag before communicating with the Arduino Mega again to collect the information. You could realistically have the Arduino Mega collect multiple samples and then send the flag and eventually the data back in this way rather than one sample at a time.

Naturally, this doesn't change the baud rate, but it may help with some of the speed of data collection if fewer handshakes between the two systems are happening. There are a couple of links on custom commands here and here.

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...