Loading ...
Sorry, an error occurred while loading the content.

Re: Converting RidgeWarriorII

Expand Messages
  • RidgeSoft
    You should be able to replace: ServoMotor leftMotor; ServoMotor rightMotor; leftMotor = new ServoMotor(leftServo, false, 14); rightMotor = new
    Message 1 of 1 , Nov 27, 2006
    • 0 Attachment
      You should be able to replace:

      ServoMotor leftMotor;
      ServoMotor rightMotor;

      leftMotor = new ServoMotor(leftServo, false, 14);
      rightMotor = new ServoMotor(rightServo, true, 14);


      with

      Motor leftMotor;
      Motor rightMotor;

      leftMotor = IntelliBrain.getMotor(1);
      rightMotor = IntelliBrain.getMotor(2);

      If you are using the AnalogShaftEncoder class, you will need to create a
      wrapper class around the motor class to add DirectionListerner support.
      See the ServoMotor class for an example. If you aren't using analog
      shaft encoders you can just remove the code that refers to the
      AnalogShaftEncoder class.

      Regards,

      RidgeSoft Support


      --- In intellibrain@yahoogroups.com, "rayraydiazz" <rayraydiazz@...>
      wrote:
      >
      > I would like to use the sample RidgewarriorII java code to test on my
      > platform but I cannot get the java code converted to use motors
      instead
      > of servos. Help!
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.