Package lejos.nxt

Examples of lejos.nxt.NXTRegulatedMotor


  public static SensorActorController getSensorController() {
    return sensorController;
  }

  private SensorActorController() {
    motorLeft = new NXTRegulatedMotor(MotorPort.A);
    motorRight = new NXTRegulatedMotor(MotorPort.C);
    lightSensorLeft = new LightSensor(SensorPort.S1);
    lightSensorRight = new LightSensor(SensorPort.S4);
    lightSensorLeft.setHigh(lightMax);
    lightSensorLeft.setLow(lightMin);
    lightSensorRight.setHigh(lightMax);
View Full Code Here


      if (leftMotorPort == null || rightMotorPort == null || centerMotorPort == null)
        throw new UnsupportedOperationException("Motor Ports Unassigned");
     
      else {
        drive = new Drive();
        leftMotor = new NXTRegulatedMotor(leftMotorPort);
        rightMotor = new NXTRegulatedMotor(rightMotorPort);
        centerMotor = new NXTRegulatedMotor(centerMotorPort);
       
       
        pilot = new DifferentialPilot(2.2f, 6.25f, leftMotor, rightMotor);
        pilot.setRotateSpeed(maxRotationSpeed);
        centerMotor.setSpeed(maxRotationSpeed);
View Full Code Here

  private UltrasonicTester() {}
 
  public static UltrasonicTester getInstance(){
    if (tester == null) {
      tester = new UltrasonicTester();
      tester.motor = new NXTRegulatedMotor(MotorPort.B);
      tester.motor.setSpeed(tester.sensorMotorSpeed);
      tester.sensor = new UltrasonicSensor(SensorPort.S4);
      tester.sensor.setMode(2);
     
      LCD.clear();
View Full Code Here

 
  public static GoalFindUltrasonicSensor getInstance() {
    if (goalFindUltrasonic == null) {
      goalFindUltrasonic = new GoalFindUltrasonicSensor();
      ultrasonicSensor = new UltrasonicSensor(SensorPort.S4);
      sweepMotor = new NXTRegulatedMotor(MotorPort.B);
      de = DataExchange.getInstance();
      sweepMotor.setSpeed(sweepSpeed);
    }
   
    return goalFindUltrasonic;
View Full Code Here

TOP

Related Classes of lejos.nxt.NXTRegulatedMotor

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.