Streaming Accel & Gyro Data?

By joel_weber , 30 June 2011

Hi,

I'm trying to stream out accelerometer and gyro readings from UC3 eval board with the Inertial 2 daughter board. I have had no problem flashing the device with MotionApps UC3 project and reading the quat data over my serial port, but I am having trouble figuring out how to modify the MotionApps project to also send accel and gyro data.

Could anyone supply some code snippets or suggestions on how to implement this?

Bryan

rrsgdtac

14 years 8 months ago

The Functional Specification document explains the APIs that would allow you to do this.

MLGetGyrosFixed, MLGetGyrosFloat --> For Gyro Data
MLGetAccelsFixed, MLGetAccelsFload --> For Accel Data

phpbb Post ID
17322

jerry

14 years 8 months ago

Within the library files mlFIFO.h contains several APIs that can be used to send different data types to the FIFO. I suggest you start looking at around line 63.

phpbb Post ID
17325

diudafej21

14 years 8 months ago

I am also working on this, and I have the Accel and Gyro data (using the example program uc3_a3_xplained, but I was wondering if there is a way to access a time stamp? Also, I need to sample at a constant rate. Is there a way to set the sample rate?

phpbb Post ID
17328

do_seoung

14 years 6 months ago

To get a time stamp you can print the timer counter value: inv_get_tick_count().

You can change the sampling rate by changing the fifo rate with inv_set_fifo_rate(). This uses the 200/(n+1) formula.

phpbb Post ID
17331
phpbb Topic ID
13341