SHARE
TWEET

Untitled

a guest Sep 22nd, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package org.firstinspires.ftc.teamcode;
  2.  
  3. import com.qualcomm.robotcore.hardware.DcMotor;
  4. import com.qualcomm.robotcore.hardware.HardwareMap;
  5.  
  6. public class HardWareBushBot
  7. {
  8.     public DcMotor BDL;
  9.     public DcMotor BDR;
  10.     public DcMotor FDR;
  11.     public DcMotor FDL;
  12.  
  13.     HardwareMap hwMap;
  14.     public HardWareBushBot()
  15.     {
  16.  
  17.     }
  18.  
  19.     public void init (HardwareMap ahwMap)
  20.     {
  21.         hwMap = ahwMap;
  22.         BDL = hwMap.dcMotor.get("BDL");
  23.         BDR = hwMap.dcMotor.get("BDR");
  24.         FDR = hwMap.dcMotor.get("FDR");
  25.         FDL = hwMap.dcMotor.get("FDL");
  26.  
  27.         BDL.setPower(0);
  28.         BDR.setPower(0);
  29.         FDL.setPower(0);
  30.         FDR.setPower(0);
  31.  
  32.         // Set all motors to run without encoders.
  33.         // May want to use RUN_USING_ENCODERS if encoders are installed.
  34.         FDR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
  35.         FDL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
  36.         BDR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
  37.         BDL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
  38.     }
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top