Skip to content

Commit

Permalink
sample added
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneuter committed Aug 5, 2016
1 parent 4202887 commit 1e1122f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions samples/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dependencies {

compileOnly project(":ev3classes")

}
22 changes: 22 additions & 0 deletions samples/src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import lejos.hardware.Battery;
import lejos.hardware.Sound;
import lejos.utility.Delay;

public class Main {

public static void main(String[] args) {
String message = args.length > 0 ? args[0] : "Hello world!";

System.out.println(message);

Delay.msDelay(500);
Sound.beep();

System.out.println();
System.out.println("Battery voltage:");
System.out.println(Battery.getVoltage());

Delay.msDelay(3000);
}

}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
rootProject.name = 'mindstorms'
//include ':dbusjava'
include ':ev3classes'
include ':samples'

0 comments on commit 1e1122f

Please sign in to comment.