Package com.cos399.test

Examples of com.cos399.test.MotorTester


   *
   */
 
  public static void main(String[] args) throws Exception{
       
    Robot robot = new Robot();
    LCD.drawString("Line Follower", 0, 0);
    LCD.drawString("Select Type: ", 0, 1);
    LCD.drawString("L button: Pilot", 0, 2);
    LCD.drawString("R button: Direct", 0, 3);

View Full Code Here


    LCD.drawString("  5: Exit", 0, 6);
  }
 
  public void handleSelection() {
    int button = 0;
    SensorTestInterface test = null;
    while (true) {
      button = Button.waitForAnyPress();
     
      if (button == Button.ID_ENTER) {
        LCD.clear();
View Full Code Here

    }
  }
 
  private void initializeSumoCompetition() {
    Behavior startupBehavior = new Startup();
    Behavior contactBehavior = new Contact();
    Behavior searchBehavior = new Search();
    Behavior[] behaviorArray = {startupBehavior, contactBehavior, searchBehavior};
   
    SumoProperties sp = SumoProperties.getInstance();
    SensorInitializer.initializeSensors();
View Full Code Here

  }
 
  private void initializeSumoCompetition() {
    Behavior startupBehavior = new Startup();
    Behavior contactBehavior = new Contact();
    Behavior searchBehavior = new Search();
    Behavior[] behaviorArray = {startupBehavior, contactBehavior, searchBehavior};
   
    SumoProperties sp = SumoProperties.getInstance();
    SensorInitializer.initializeSensors();
   
View Full Code Here

      }
    }
  }
 
  private void initializeSumoCompetition() {
    Behavior startupBehavior = new Startup();
    Behavior contactBehavior = new Contact();
    Behavior searchBehavior = new Search();
    Behavior[] behaviorArray = {startupBehavior, contactBehavior, searchBehavior};
   
    SumoProperties sp = SumoProperties.getInstance();
View Full Code Here

    Behavior startupBehavior = new Startup();
    Behavior contactBehavior = new Contact();
    Behavior searchBehavior = new Search();
    Behavior[] behaviorArray = {startupBehavior, contactBehavior, searchBehavior};
   
    SumoProperties sp = SumoProperties.getInstance();
    SensorInitializer.initializeSensors();
   
    LCD.clear();
   
    de.setDrive(Drive.getInstance(sp.getLeftMotorPort(), sp.getRightMotorPort(),
        sp.getCenterMotorPort(), sp.getMaxRotationSpeed()));
   
    (new Arbitrator(behaviorArray)).start();
  }
View Full Code Here

 
  public static ActionTest getInstance() {
    if (at == null) {
      at = new ActionTest();
      de = SumoDataExchange.getInstance();
      SumoProperties sp = SumoProperties.getInstance();
      de.setDrive(Drive.getInstance(sp.getLeftMotorPort(), sp.getRightMotorPort(),
          sp.getCenterMotorPort(), sp.getMaxRotationSpeed()));
    }
   
    return at;
  }
View Full Code Here

  private MotorTest() { }
 
  public static MotorTest getInstance() {
    if (mt == null) {
      mt = new MotorTest();
      SumoProperties sp = SumoProperties.getInstance();
      testDrive = Drive.getInstance(sp.getLeftMotorPort(), sp.getRightMotorPort(),
          sp.getCenterMotorPort(), sp.getMaxRotationSpeed());
    }
   
    return mt;
  }
View Full Code Here

  private static Ultrasonic us = null;
 
  private SensorInitializer() { }
 
  public static void initializeSensors() {
    SumoProperties sp = SumoProperties.getInstance();
   
    ts = Touch.getInstance(sp.getTouchSensorPort());
    ls = Light.getInstance(sp.getLightSensorPort(), sp.getColorSensorPort());
    us = Ultrasonic.getInstance(sp.getUltrasonicSensorPort());
    us.setContinuous();
   
    ts.start();
    ls.start();
    us.start();
View Full Code Here

TOP

Related Classes of com.cos399.test.MotorTester

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.