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

Tom Parker tom at carrott.org
Tue Aug 23 06:39:38 EDT 2011


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)



More information about the OLPC-NZ mailing list