How to find the sampling frequency?

Hey all,

I am currently working on a project which requires data over a period of time: 3 axis acceleration, 3 axis gyro, 3 axis magnetic sensing.

I am using the 10 DOF DF robot.

I wrote a code in Arduino, then when I launch it I get the data from the serial monitor and copy paste them in excel.

My issue is : I am not able to figure out what the sampling frequency is.

I know that the frequency rate is supposed to be the baudrate divided by the number of bits the arduino outputs. However, I am not able to figure this out since I have 3 censors I am using. I went through the sensor datasheets and each captor can output different number of bits (Let's say ADXL345 can output either 10, 11, 12 or 13).

Thank you very much!

Insert in your code millis() and send data with pack-10, difference in two consecutive values is T period, F = 1 /T.

The sampling frequency is how many readings from your sensor are taken per second. It makes no difference how many bits of data are read for each reading. Assuming you are taking your nine readings each time your Arduino program loops, the sampling frequency is the same as how many program loops you get per second. If you have a delay in your loop such as for example delay(50); then it will take a little more 50 milliseconds for each loop (with other things in your loop taking some time), so your sampling rate would be a little less than 20 samples per second.

yanleman:
I know that the frequency rate is supposed to be the baudrate divided by the number of bits the arduino outputs.

"Frequency rate" is poor terminology. You seem to be muddling up "sampling rate", "net bit rate" and "baud rate" (symbol rate).