(String[] args)
| 4 | public class Demo { |
| 5 | |
| 6 | public static void main(String[] args) throws Exception { |
| 7 | |
| 8 | System.out.println("GoPiGo3 Demo"); |
| 9 | |
| 10 | GoPiGo3 platform = new GoPiGo3(); |
| 11 | |
| 12 | Instant start = Instant.now(); |
| 13 | |
| 14 | //Motor Left Power 100 |
| 15 | System.out.println("Running left motor with Power 100"); |
| 16 | platform.runMotor(GoPiGo3.MOTOR_LEFT, 100); |
| 17 | |
| 18 | //Motor Right Power 100 |
| 19 | System.out.println("Running right motor with Power 100"); |
| 20 | platform.runMotor(GoPiGo3.MOTOR_RIGHT, 100); |
| 21 | |
| 22 | System.out.println("Delay 5 seconds"); |
| 23 | Thread.sleep(5000); |
| 24 | |
| 25 | System.out.println("Stop motors"); |
| 26 | platform.stopMotors(); |
| 27 | |
| 28 | Instant end = Instant.now(); |
| 29 | System.out.println(Duration.between(start, end)); |
| 30 | |
| 31 | System.out.println("End demo"); |
| 32 | |
| 33 | } |
| 34 | |
| 35 | } |
nothing calls this directly
no test coverage detected