5 * Simple test of Acceleration (Tilt) sensors.
7 * This should work with Mindsensors and HiTechnic Acceleration
10 * @author Lawrie Griffiths
13 public class TiltTest {
15 public static void main(String[] args) throws Exception {
16 TiltSensor tilt = new TiltSensor(SensorPort.S1);
18 while(!Button.ESCAPE.isPressed()) {
20 LCD.drawInt(tilt.getXTilt(), 6, 0, 0);
21 LCD.drawInt(tilt.getYTilt(), 6, 0, 1);
22 LCD.drawInt(tilt.getZTilt(), 6, 0, 2);
23 LCD.drawInt(tilt.getXAccel(), 6, 0, 3);
24 LCD.drawInt(tilt.getYAccel(), 6, 0, 4);
25 LCD.drawInt(tilt.getZAccel(), 6, 0, 5);