Visit and bookmark both the leJOS EV3 API documentation (if that link doesn't work, use this online version instead) and the Java 8 API documentation.
If you're curious, here is the code we used in class today:
import lejos.hardware.ev3.EV3; import lejos.hardware.ev3.LocalEV3; import lejos.hardware.lcd.TextLCD; import lejos.hardware.Button; public class BrickInfo { public static void main(String[] args) { EV3 brick = LocalEV3.get(); String name = brick.getName(); // direct access int mV = brick.getPower().getVoltageMilliVolt(); // chained access TextLCD text = brick.getTextLCD(); // intermediate text.clear(); text.drawString(name, 0, 0); text.drawInt(mV, 4, 0, 1); Button.waitForAnyPress(); } }
You should feel free to take that code and make modifications to it!
Your project during next class will be to build the slowest robot possible. You'll all run a standard program that rotates the motors through a set number of rotations. You'll change the speed of your robot through careful construction. This is an engineering challenge, and so you must not intentionally cripple your robot. There are some rules you must follow:
The types, size, and arrangement of components in your robot will affect its speed. Those are the items you should focus on.