SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Mee_n_Mac
#167568
Do you mean this ?
https://www.sparkfun.com/products/10724

If so there is no predefined output format. It has 3 sensors on it, each has an output (per it's datasheet) depending on what the controller asks for. Ask for gyro pitch, accel X and magnetometer Z and that's what you'll get. Ask for accel Z, Y then X and that's what you'll get. There is no on-stick controller.

Are you familiar w/I2C ?
http://en.wikipedia.org/wiki/I%C2%B2C#Message_protocols
By saikobagarib
#167612
I don't quite know how this works. I'm trying to get the reading of the data stream. Currently, it's showing something like this

Image

What exactly is it showing? How do I see the pitch, roll, yaw data?
By waltr
#167623
Use a HEX viewer to see those values in binary or a terminal program that shows value in hex (X-CTU is nice for this).
The sensor outputs (from the I2C interface) are pure binary. Re-read the data sheets for the sensors.
You should also look up and study how numbers can be represented and how number are done in binary. Start reading the Wikipedia about this.
By Mee_n_Mac
#167654
Also post the code for whatever controller you have reading the stick and how it's sending it to your PC.
(click below)
CodeButtonTags.jpg
You do not have the required permissions to view the files attached to this post.
By Valen
#167711
saikobagarib wrote:I don't quite know how this works. I'm trying to get the reading of the data stream. Currently, it's showing something like this

[image snipped]

What exactly is it showing? How do I see the pitch, roll, yaw data?
How do you get this data stream?

It is coming from a serial port COM7. And the icon on the window header suggests you use a Arduino of some sort. But UART serial protocol is very different from the I2C protocol that the sensor stick requires. The latter needs a clock signal generated by a 'Master' device, like a microcontroller. The sensor stick changes the data line at specific states of the clock signal made by the microcontroller (or whatever). Whereas the UART serial protocol is based on fixed bit periods and no separate clock signal.

So either you have some sort of sketch that translates I2C data to serial. Or you expect the datastream to be a uart serial stream. Please explain how you have this sensor connected, and how this datastream is passed from the sensor to your computer.
By saikobagarib
#167736
Hi, the sensor stick is connected to an Arduino Pro mini, and then connected to XBee for wireless connection. Attached is the program.
You do not have the required permissions to view the files attached to this post.
By Mee_n_Mac
#167738
Are they (sensor stick, Arduino Pro mini and XBee) also connected to a quad copter ? The output would seem to be a complicated telemetry stream whose content depends on the state of the copter. It may have the sensor stick readings buried in the stream but there's more to it than just that data.

What is it that you're trying to do, read a sensor stick or decode the Remy DO's Multi-Rotor Aerial Vehicle telemetry stream ?
By saikobagarib
#167743
Mee_n_Mac wrote:Are they (sensor stick, Arduino Pro mini and XBee) also connected to a quad copter ? The output would seem to be a complicated telemetry stream whose content depends on the state of the copter. It may have the sensor stick readings buried in the stream but there's more to it than just that data.

What is it that you're trying to do, read a sensor stick or decode the Remy DO's Multi-Rotor Aerial Vehicle telemetry stream ?
They are not yet connected to a quadcopter. I am now trying to be able to read the data because I want to display the data on some indicators (heading indicator, attitude indicator). And to do that, I have to decode Remy DO's stream? Are there other simpler ways I can do it?

I was just given all these sensor, Arduino pro mini (programed), XBee and was asked to make a display gauge using LabVIEW.

I am slowly trying to understand what the problem is. So from all the replies, I know now I need some hardware/program to translate the sensor I2C to serial first?
By saikobagarib
#167748
I guess I want to decode Remy DO's C code so that I can find out the data stream format. But I do not know how to read code :x
By Valen
#167751
I suggest you don't.

Read up on what the I2C protocol is. It is also known as the two-wire interface (TWI) protocol. Based on the datasheets of the Sensorstick chips, and some arduino I2C/TWI examples (which there should be plenty on the web) you should be able to make a simple sketch interogating the sensor stick. Then, send those required values over the serial port to your pc with that sketch. I'll asume you know how to correctly setup XBees. But for the time being, exclude this device from your setup. Learn how to use the Arduino with I2C/TWI and serial port first. How Labview works I have no idea. But I am sure there is a way to use the serial port as an input for data.

[EDIT] Better yet, ... Make sure you can write a "Hello World"-serial-sketch on the arduino first! You'll need the serial link first to be able to transfer the data and events of the I2C layer. Without it you'll be working blind trying to debug bugs in your sketch.


By using Remy DO's code you'll be including too much complexity and unknowns into your project. That only adds to your confusion. Get to the heart of the matter (I2C) and keep it simple. Stick with the bare essentials(I2C,Arduino, getting serial output to a terminal program), and add on layers of complexity as knowledge and experience grows. (Labview interpretation, XBee wireless link)

Once this is done, you'll likely have a bit more programming knowledge (no pun intended :) ) to be able to understand Remy DO's code (if you are really required to use it). In your current state of knowledge I fear this is a pointless exercise.
By Mee_n_Mac
#167762
saikobagarib wrote: I am now trying to be able to read the data because I want to display the data on some indicators (heading indicator, attitude indicator). And to do that, I have to decode Remy DO's stream?
Yup. Moreover those particular variables are calculated quantities, based in part, from the sensor stick output. Reading the stick alone won't get you them.
saikobagarib wrote:Are there other simpler ways I can do it?
Nope.
saikobagarib wrote:I was just given all these sensor, Arduino pro mini (programed), XBee and was asked to make a display gauge using LabVIEW.
Sounds like a school assignment. If you follow the comments at the top of the files, you'll find a website and a forum dedicated to this software package. There you might learn of an app that runs on your phone that, among other things, displays the output data. There's inferences to a PC program that preceded it. You might learn a lot from that program.