Menu

Tachometer/rotation sensor

Help
da288
2010-02-06
2013-04-25
  • da288

    da288 - 2010-02-06

    Hi,

    Really basic question but I couldn't find this in the sensor guide. How do you access the rotation sensor values i.e. to get the distance travelled by the motor. Any help much appreciated. Thanks.

     
  • angrymop

    angrymop - 2010-02-06

    hi,

    this is an example to read out the angle of a motor.

    PORT=0;// set port which you wants to read out
    c = NXT::Motor::GetRotationCount(&comm,PORT);

    cout<<"Port" << PORT <<"=" <<c <<"angle"<<"\n";

     

Log in to post a comment.