MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / main

Method main

Software/Java/src/main/java/Demo.java:6–33  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

4public 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}

Callers

nothing calls this directly

Calls 2

runMotorMethod · 0.95
stopMotorsMethod · 0.95

Tested by

no test coverage detected