[OLPC New Zealand] New prototype XO-1.75s in Auckland, New Zealand

Walter Bender walter.bender at gmail.com
Tue Aug 23 07:54:32 EDT 2011

On Tue, Aug 23, 2011 at 6:39 AM, Tom Parker <tom at carrott.org> wrote:
> On Mon, 2011-08-22 at 07:08 -0400, Walter Bender wrote:
>> Turtle Art v 114 has an accelerometer block in the sensor palette that
>> should appear on 1.75 machines. Maybe you could play with it? (It
>> pushes X, Y, Z values to the stack: you retrieve them with 3
>> consecutive 'pop' blocks (found on the palette with the gear).
> Nice! I made a simple "position the turtle based on accelerometer x and
> y" and found the sensor to be quite noisy. Averaging 5 values seemed to
> be a lot better but was quite slow. I'm not sure if the problem was my
> average code (a loop adding each value to a box and discarding z into a
> comment (what happens if you overflow the stack?)) or the sensor itself
> is slow to respond.
> I am getting perhaps 5Hz averaging 5 values and using setxy to position
> the turtle. I get much more than that without the averaging.
> (I tried overflowing the stack, and didn't manage to do it, but at 5Hz,
> it might take a while)

In my tests, averaging 4 samples seemed to be enough for a relatively
noise-free experience. If you hide the blocks, Turtle Art runs faster,
fast enough to make the experience reasonable.


Walter Bender
Sugar Labs

More information about the Devel mailing list