Skip to content

Commit 5f76f4e

Browse files
committed
Adding new example
1 parent d943bee commit 5f76f4e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package ev3dev.actuators.lego.motors;
2+
3+
import lejos.robotics.RegulatedMotor;
4+
import lejos.utility.Delay;
5+
6+
/**
7+
* Created by jabrena on 28/6/17.
8+
*/
9+
public class MotorEncoderTest {
10+
11+
public static void main(String[] args){
12+
13+
RegulatedMotor motor = Motor.A;
14+
motor.resetTachoCount();
15+
motor.coast();
16+
17+
for (int x=1; x < 20; x++){
18+
19+
System.out.println(motor.getTachoCount());
20+
21+
Delay.msDelay(500);
22+
}
23+
24+
}
25+
26+
}

0 commit comments

Comments
 (0)