Re: Trying to read data from accelerometer buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29/10/15 10:05, Ibrahim Mattus Neto wrote:
> Hi, I am having issues reading from a accelerometer and I hope yo
> might help me (if I should ask this question elsewhere, please tell
> me)
> 
> What I am trying to do is get data from a buffer (I am using the
> source code from iio_readdev as an example) but I can't figure it out
> how to interpret the data properly.
A quick google suggests this is from libiio.  Perhaps Paul or Lars
can give more detail.
> 
> I was expecting to get a bunch of numbers related to the X axis but
> when it writes to stdout I get a bunch of weird characters, here is
> the output:
> 
> @������@������������������������������������������������
> 
> How can I get values of x, y and z axes?
The data is in binary, whereas piping it to stdout is presumably going to expect
asci characters.   I would imagine, glancing at that example code
that it was meant for piping into some other program that actually interpreted
the stream?

Alternatively, take a look at tools/iio/generic_buffer.c in the kernel source
tree for an example of how to read from the buffers.
> 
> Is there anything else I should provide? Is there some information missing?
> 
> Thanks in advance!
> Ibrahim
> N�����r��y���b�X��ǧv�^�)޺{.n�+����{��*"��^n�r���z���h����&���G���h�(�階�ݢj"���m�����z�ޖ���f���h���~�mml==
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux