How to use the High Technic Tilt Sensor?

HomeForumsMonoBrick EV3 FirmwareHow to use the High Technic Tilt Sensor?

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4048

    Hi, I have got a problem with my Tilt Sensor. I tried out

    (Only a section of the program)

    while (true) 
    {
    LcdConsole.WriteLine ("" + SensorTilt.ReadAsString ());
    Thread.Sleep (1000);
    }

    which just normaly gives me the coordinates of x, y and z but I do not know how to use this data in a normal program and how to request only x, y or z…

    Thanks for the help

    #4054
    Author Image
    Anders Søborg
    Keymaster

    Hi

    Don’t read the value as a string. From the documentation it is clear that you need to use ReadPosition () This will return a Position object which has X, Y, Z values

    Anders

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Posted in

Make a donation