Problems Reading Accelerometer Device

Thomas White taw27 at
Thu Nov 27 00:20:49 CET 2008

On Wed, 26 Nov 2008 14:32:35 +0000
Andy Green <andy at> wrote:

> Can you not do a select() to see how the land lies before doing the
> read?

Checking with select() works as expected - I frequently get no data if I
check too often, I have to wait longer for the next sample if there's a
threshold set and the Neo isn't moving, and I never wait more than a
few microseconds for the data once select() has said that data is

I haven't had any of the timing problems described by the original
poster during my experimentation, apart from when a threshold
was set.  For a low threshold, I get a continuous stream of data then
the odd pause for tens of ms or more (as expected).

However, I'm still a little confused about whether non-blocking reads
are supposed to be possible or not...?  Documentation/input/input.txt
in the kernel source seems to suggest so, but I couldn't figure it out
by looking at the source itself.


More information about the devel mailing list