Main Site Documentation

BrainPad BP2 Accelerometer


#1

It seems that accelerometer don’t return a value between -2 to 2 like says the docs https://docs.brainpad.com/go-beyond/components/accelerometer.html
I test the code below and value > - |2| on x, y and z

namespace BP2Accelerometer
{
    class Program
    {
        static void Main()
        {
            while (true)
            {
                BrainPad.Display.DrawSmallText(0, 0, "X : " + BrainPad.Accelerometer.ReadX().ToString("F2"));
                BrainPad.Display.DrawSmallText(0, 10, "Y : " + BrainPad.Accelerometer.ReadY().ToString("F2"));
                BrainPad.Display.DrawSmallText(0, 20, "Z : " + BrainPad.Accelerometer.ReadZ().ToString("F2"));
                BrainPad.Display.RefreshScreen();
                Thread.Sleep(100);
            }
            
        }
    }
}

#2

We’ve actually changed the accelerometer to return -100 to 100 (-100 being -1g and 100 being 1g). We’ll update the doc you linked to reflect that, thanks for the catch.


#3

Thanks John
I update my french wiki. http://webge.dyndns-server.com/dokuwiki/doku.php?id=tinyclros:accueiltinyclr