dashboard
This commit is contained in:
		| @@ -11,7 +11,7 @@ import com.ctre.phoenix.led.RainbowAnimation; | ||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||
|  | ||||
| public class Bougie extends SubsystemBase { | ||||
|   CANdle candle = new CANdle(50); | ||||
|   CANdle candle = new CANdle(23); | ||||
|   CANdleConfiguration config = new CANdleConfiguration(); | ||||
|   RainbowAnimation rainbowAnim = new RainbowAnimation(1, 0.5, 64); | ||||
|   /** Creates a new Bougie. */ | ||||
|   | ||||
| @@ -1,26 +0,0 @@ | ||||
| // Copyright (c) FIRST and other WPILib contributors. | ||||
| // Open Source Software; you can modify and/or share it under the terms of | ||||
| // the WPILib BSD license file in the root directory of this project. | ||||
|  | ||||
| package frc.robot.subsystems; | ||||
|  | ||||
| import edu.wpi.first.wpilibj.DigitalInput; | ||||
| import edu.wpi.first.wpilibj.motorcontrol.Spark; | ||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||
|  | ||||
| public class Grimpeur extends SubsystemBase { | ||||
|   /** Creates a new Grimpeur. */ | ||||
|   public Grimpeur() {} | ||||
|   final Spark grimpeur = new Spark(16); | ||||
|   final DigitalInput limit1 = new DigitalInput(0); | ||||
|   public void grimpe(double vitesse){ | ||||
|     grimpeur.set(vitesse); | ||||
|   } | ||||
|   final void stop(){ | ||||
|     limit1.get(); | ||||
|   } | ||||
|   @Override | ||||
|   public void periodic() { | ||||
|     // This method will be called once per scheduler run | ||||
|   } | ||||
| } | ||||
| @@ -8,7 +8,11 @@ import com.revrobotics.spark.SparkFlex; | ||||
| import com.revrobotics.spark.SparkMax; | ||||
| import com.revrobotics.spark.SparkLowLevel.MotorType; | ||||
|  | ||||
| import edu.wpi.first.networktables.GenericEntry; | ||||
| import edu.wpi.first.wpilibj.DigitalInput; | ||||
| import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; | ||||
| import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardComponent; | ||||
| import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; | ||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||
|  | ||||
| public class Requin extends SubsystemBase { | ||||
| @@ -17,7 +21,11 @@ public class Requin extends SubsystemBase { | ||||
|   final SparkFlex balaye = new SparkFlex(15, MotorType.kBrushless); | ||||
|   final SparkMax rotatione = new SparkMax(17, MotorType.kBrushless); | ||||
|   final DigitalInput limit3 = new DigitalInput(4); | ||||
|   final DigitalInput limit5 = new DigitalInput(5); | ||||
|  | ||||
|   GenericEntry teb = Shuffleboard.getTab("teb") | ||||
|   .add("amp",encodeur()) | ||||
|   .getEntry(); | ||||
|      | ||||
|   public void balaye(double vitesse){ | ||||
|     balaye.set(vitesse); | ||||
|   } | ||||
| @@ -27,9 +35,6 @@ public class Requin extends SubsystemBase { | ||||
|   public boolean enHaut(){ | ||||
|   return limit3.get(); | ||||
|   }  | ||||
|   public boolean stop(){ | ||||
|   return  limit5.get(); | ||||
|   } | ||||
|   public double encodeur(){ | ||||
|   return rotatione.getEncoder().getPosition(); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user