This is an example of how to use the CurrentTick and MotorRotationCount functions.
#define MOTOR OUT_A
#define FULL_SPEED 100
#define DEG_TO_RPM 166.6667 // converts degrees per millisecond to RPM
long prev_tick;
long prev_deg = 0;
string rpm_msg()
{
float rpm = deg * DEG_TO_RPM / dt;
}
task main()
{
OnFwd(MOTOR, FULL_SPEED);
while (true)
{
}
}