diff --git a/src/main/cpp/Auton/Auton.h b/src/main/cpp/Auton/Autown.cpp similarity index 57% rename from src/main/cpp/Auton/Auton.h rename to src/main/cpp/Auton/Autown.cpp index c1554af..414ab23 100644 --- a/src/main/cpp/Auton/Auton.h +++ b/src/main/cpp/Auton/Autown.cpp @@ -1,8 +1,11 @@ -#pragma once #include -#include +#include -void Robot::AutonomousInit2() +//#define USSide +//#define USStraight +#define TwoBalls + +void Robot::AutownInit() { m_autoSelected = m_chooser.GetSelected(); // m_autoSelected = SmartDashboard::GetString("Auto Selector", @@ -17,30 +20,34 @@ void Robot::AutonomousInit2() }*/ step = forward1; - driveboi2.Follow(driveboi1, /*invert*/ false); - driveboi4.Follow(driveboi3, /*invert*/ false); - driveboi5.Follow(driveboi1, /*invert*/ false); - driveboi6.Follow(driveboi3, /*invert*/ false); + driveboi2->Follow(*driveboi1, /*invert*/ false); + driveboi4->Follow(*driveboi3, /*invert*/ false); + driveboi5->Follow(*driveboi1, /*invert*/ false); + driveboi6->Follow(*driveboi3, /*invert*/ false); + + //auton variables + forwardBackwardDistance = 46; //23 is about 5 ft + turnDistance = 29; //25 is about 360 degrees on shop floors, 29 is about 360 on carpet } -void Robot::AutonomousPeriodic2() +void Robot::AutownPeriodic() { - double forwardBackward = spinReader1.GetPosition() - spinReader3.GetPosition(); - double turn = spinReader1.GetPosition() + spinReader3.GetPosition(); - /*if (m_autoSelected == kAutoNameCustom) { +/*if (m_autoSelected == kAutoNameCustom) { // Custom Auto goes here } else { // Default Auto goes here }*/ - // Ultra Sonic Straight Shot (Best Option) (Not Tested) +// Ultra Sonic Straight Shot (Best Option) (Not Tested) +#ifdef USStraight + double turn = spinReader1.GetPosition() + spinReader3.GetPosition(); switch (step) { case forward1: { - if (batman.GetValue() > 375) //230 - 630 usable range + if (batman->GetValue() > 375) //230 - 630 usable range { Robot::Forwards(); } @@ -53,9 +60,9 @@ void Robot::AutonomousPeriodic2() } case dump: { - roboMyRio.Set(true); + roboMyRio->Set(true); Wait(.5); - roboMyRio.Set(false); + roboMyRio->Set(false); step = back1; break; } @@ -87,7 +94,7 @@ void Robot::AutonomousPeriodic2() } case forward2: { - if (batman.GetValue() > 250) + if (batman->GetValue() > 250) { Robot::Forwards(); } @@ -140,25 +147,27 @@ void Robot::AutonomousPeriodic2() default: break; } +#endif - //UltraSonic Side Shot (2nd Best Option) (Not Tested) - /* -switch (step) +//UltraSonic Side Shot (2nd Best Option) (Not Tested) +#ifdef USSide + double turn = spinReader1.GetPosition() + spinReader3.GetPosition(); + switch (step) { - case forwardfromside: + case forward1: { if (forwardBackward < 92) { - Robot::Forwards(); - } + Robot::Forwards(); + } else { ZeroMotors(); - step = turnsideshot; + step = turn1; } break; } - case turnsideshot: + case turn1: { if (turn < 14.5) { @@ -172,7 +181,7 @@ switch (step) } case forward1: { - if (batman.GetValue() > 375) //230 - 630 usable range + if (batman->GetValue() > 375) //230 - 630 usable range { Robot::Forwards(); } @@ -185,9 +194,9 @@ switch (step) } case dump: { - roboMyRio.Set(true); + roboMyRio->Set(true); Wait(.5); - roboMyRio.Set(false); + roboMyRio->Set(false); step = back1; break; } @@ -219,7 +228,7 @@ switch (step) } case forward2: { - if (batman.GetValue() > 250) + if (batman->GetValue() > 250) { Robot::Forwards(); } @@ -272,5 +281,81 @@ switch (step) default: break; } -*/ -} \ No newline at end of file +#endif + +//basic auton to collect 2 balls only +#ifdef TwoBalls + switch (step) + { + case forward1: + { + if (forwardBackward < 198.49) + { + Robot::Forwards(); + } + else + { + ZeroMotors(); + step = back1; + } + break; + } + case back1: + if (forwardBackward > 198.49) + { + Robot::Backwards(); + } + else + { + ZeroMotors(); + step = null; + } + break; + + default: + + break; + } +#endif +} + +void Robot::ZeroMotors() +{ + driveboi1->Set(0); + driveboi3->Set(0); + spinReader1.SetPosition(0); + spinReader2.SetPosition(0); + spinReader3.SetPosition(0); + spinReader4.SetPosition(0); + spinReader5.SetPosition(0); + spinReader6.SetPosition(0); +} + +void Robot::Forwards() +{ + driveboi1->Set(-.5); + driveboi3->Set(.5); +} +void Robot::Backwards() +{ + driveboi1->Set(.5); + driveboi3->Set(-.5); +} +void Robot::Clock() +{ + driveboi1->Set(.5); + driveboi3->Set(.5); +} +void Robot::CounterClock() +{ + driveboi1->Set(-.5); + driveboi3->Set(-.5); +} +void Robot::Wait(double seconds) +{ + clock_t endwait; + endwait = clock() + seconds * CLOCKS_PER_SEC; + while (clock() < endwait) + { + } +} diff --git a/src/main/cpp/Robot.cpp b/src/main/cpp/Robot.cpp index e7ad5a4..c5326a5 100644 --- a/src/main/cpp/Robot.cpp +++ b/src/main/cpp/Robot.cpp @@ -1,16 +1,13 @@ #include "Robot.h" -#include -#include +#include void Robot::RobotInit() { - //m_chooser.SetDefaultOption(kAutoNameDefault, kAutoNameDefault); - //m_chooser.AddOption(kAutoNameCustom, kAutoNameCustom); - //frc::SmartDashboard::PutData("Auto Modes", &m_chooser); - - //setting up camera + //setting up cameras fbi = frc::CameraServer::GetInstance()->StartAutomaticCapture(0); fbi.SetVideoMode(cs::VideoMode::PixelFormat::kYUYV, 320, 240, 10); + cia = frc::CameraServer::GetInstance()->StartAutomaticCapture(1); + cia.SetVideoMode(cs::VideoMode::PixelFormat::kYUYV, 320, 240, 10); //setting up controller neighborlyInputDevice = new frc::XboxController(1); @@ -24,41 +21,76 @@ void Robot::RobotInit() moreSpeed = new frc::JoystickButton(lonelyStick, 3); putItIn = new frc::JoystickButton(lonelyStick, 1); + //brit motors + driveboi1 = new rev::CANSparkMax(7, rev::CANSparkMax::MotorType::kBrushless); + driveboi2 = new rev::CANSparkMax(10, rev::CANSparkMax::MotorType::kBrushless); + driveboi3 = new rev::CANSparkMax(13, rev::CANSparkMax::MotorType::kBrushless); + driveboi4 = new rev::CANSparkMax(2, rev::CANSparkMax::MotorType::kBrushless); + driveboi5 = new rev::CANSparkMax(8, rev::CANSparkMax::MotorType::kBrushless); + driveboi6 = new rev::CANSparkMax(9, rev::CANSparkMax::MotorType::kBrushless); + + //brit motor groups + speedyboiL = new frc::SpeedControllerGroup(*driveboi1, *driveboi2, *driveboi3); + speedyboiR = new frc::SpeedControllerGroup(*driveboi4, *driveboi5, *driveboi6); + + //Encoder creation + spinReader1 = driveboi1->GetEncoder(); + spinReader2 = driveboi2->GetEncoder(); + spinReader3 = driveboi3->GetEncoder(); + spinReader4 = driveboi4->GetEncoder(); + spinReader5 = driveboi5->GetEncoder(); + spinReader6 = driveboi6->GetEncoder(); + + //winch encoder creation + pimp = whench->GetEncoder(); + //climber encoder creation + gwen = spoodermoon->GetEncoder(); + + //winch motor creation + whench = new rev::CANSparkMax(12, rev::CANSparkMax::MotorType::kBrushless); + //climber motor creation + spoodermoon = new rev::CANSparkMax(11, rev::CANSparkMax::MotorType::kBrushless); + //mike whipper motor creation + whippedCheese = new ctre::phoenix::motorcontrol::can::VictorSPX(25); + //mike whipper up/down solenoid + viagra = new frc::Solenoid(3); + //intake motor creation + simp = new rev::CANSparkMax(1, rev::CANSparkMax::MotorType::kBrushless); + egirl = new rev::CANSparkMax(3, rev::CANSparkMax::MotorType::kBrushless); + //setting up drivetrain - brit = new frc::DifferentialDrive(speedyboiL, speedyboiR); + brit = new frc::DifferentialDrive(*speedyboiL, *speedyboiR); + + //sonlenoid + peerPressure1 = new frc::Solenoid(0); + peerPressure2 = new frc::Solenoid(1); + roboMyRio = new frc::Solenoid(2); + + //compressor + bonusPressure = new frc::Compressor(0); + + //limit switch + stopIt = new frc::DigitalInput(9); + + //setting up us sensor + batman = new frc::AnalogInput(0); + + //mike whipper and intake variable + toggle = 1; } -/** - * This function is called every robot packet, no matter the mode. Use - * this for items like diagnostics that you want ran during disabled, - * autonomous, teleoperated and test. - * - *

This runs after the mode specific periodic functions, but before - * LiveWindow and SmartDashboard integrated updating. - */ void Robot::RobotPeriodic() { } -/** - * This autonomous (along with the chooser code above) shows how to select - * between different autonomous modes using the dashboard. The sendable chooser - * code works with the Java SmartDashboard. If you prefer the LabVIEW Dashboard, - * remove all of the chooser code and uncomment the GetString line to get the - * auto name from the text box below the Gyro. - * - * You can add additional auto modes by adding additional comparisons to the - * if-else structure below with additional strings. If using the SendableChooser - * make sure to add them to the chooser code above as well. - */ void Robot::AutonomousInit() { - Robot::AutonomousInit2(); + Robot::AutownInit(); } void Robot::AutonomousPeriodic() { - Robot::AutonomousPeriodic2(); + Robot::AutownPeriodic(); } void Robot::TeleopInit() @@ -89,12 +121,13 @@ void Robot::TeleopPeriodic() frc::SmartDashboard::PutNumber("Encoder5 Position", spinReader5.GetPosition()); frc::SmartDashboard::PutNumber("Encoder6 Position", spinReader6.GetPosition()); frc::SmartDashboard::PutNumber("climber position", -gwen.GetPosition()); + //read sensor - double distance = batman.GetValue() * 0.393701; //multiplying by 0.393701 converts the sonar value to inches (hopefully) + double distance = batman->GetValue() * 0.393701; //multiplying by 0.393701 converts the sonar value to inches (hopefully) frc::SmartDashboard::PutNumber("Range Sensor 1", distance); // Code for deadzones on joystick - notFarEnough = .05; /*todo: Adjust to driver's needs*/ + notFarEnough = .05; if (-lonelyStick->GetY() < notFarEnough || -lonelyStick->GetY() > -notFarEnough) { lonelyY = lonelyStick->GetY(); @@ -105,22 +138,21 @@ void Robot::TeleopPeriodic() } //making the compressor compress - bonusPressure.SetClosedLoopControl(true); + bonusPressure->SetClosedLoopControl(true); //gearbox shifting code - peerPressure2.Set(lessSpeed->Get()); - peerPressure1.Set(moreSpeed->Get()); + peerPressure2->Set(lessSpeed->Get()); + peerPressure1->Set(moreSpeed->Get()); //pneumatic actuator if (putItIn->Get()) { - roboMyRio.Set(true); + roboMyRio->Set(true); Robot::Wait(.5); - roboMyRio.Set(false); + roboMyRio->Set(false); } - //mike - //intake code + //mike whipper and intake code if (neighborlyInputDevice->GetAButtonReleased()) { toggle = -toggle; @@ -128,49 +160,51 @@ void Robot::TeleopPeriodic() if (toggle == 1) { - viagra.Set(false); - simp.Set(0); - whippedCheese.Set(ControlMode::PercentOutput, 0); //should be 0 just testing + viagra->Set(false); + simp->Set(0); + egirl->Set(0); + whippedCheese->Set(ControlMode::PercentOutput, 0); } else if (toggle == -1) { - viagra.Set(true); - simp.Set(.5); - whippedCheese.Set(ControlMode::PercentOutput, .8); //should be .1 just testing + viagra->Set(true); + simp->Set(.5); + egirl->Set(-.5); + whippedCheese->Set(ControlMode::PercentOutput, 0.8); } //winch code if (neighborlyInputDevice->GetBButton()) { - whench.Set(1); + whench->Set(1); } else { - whench.Set(0); + whench->Set(0); } //climber code if (neighborlyInputDevice->GetTriggerAxis(frc::GenericHID::JoystickHand::kRightHand) > 0) { - spoodermoon.Set(-neighborlyInputDevice->GetTriggerAxis(frc::GenericHID::JoystickHand::kRightHand) * .2); + spoodermoon->Set(-neighborlyInputDevice->GetTriggerAxis(frc::GenericHID::JoystickHand::kRightHand) * .2); } else if (neighborlyInputDevice->GetTriggerAxis(frc::GenericHID::JoystickHand::kLeftHand) > 0) { - spoodermoon.Set(neighborlyInputDevice->GetTriggerAxis(frc::GenericHID::JoystickHand::kLeftHand) * .2); + spoodermoon->Set(neighborlyInputDevice->GetTriggerAxis(frc::GenericHID::JoystickHand::kLeftHand) * .2); } else { - spoodermoon.Set(0); + spoodermoon->Set(0); } //Bumber to preset climbing positions (63 in and all the way down) if (neighborlyInputDevice->GetBumper(frc::GenericHID::JoystickHand::kRightHand) && -gwen.GetPosition() < 82) { - spoodermoon.Set(-.2); + spoodermoon->Set(-.2); } else if (neighborlyInputDevice->GetBumper(frc::GenericHID::JoystickHand::kLeftHand) && -gwen.GetPosition() > 0) { - spoodermoon.Set(.2); + spoodermoon->Set(.2); } //90 Degree turn code (Not Tested) @@ -193,47 +227,6 @@ void Robot::TeleopPeriodic() void Robot::TestPeriodic() {} -void Robot::ZeroMotors() -{ - driveboi1.Set(0); - driveboi3.Set(0); - spinReader1.SetPosition(0); - spinReader2.SetPosition(0); - spinReader3.SetPosition(0); - spinReader4.SetPosition(0); - spinReader5.SetPosition(0); - spinReader6.SetPosition(0); -} - -void Robot::Forwards() -{ - driveboi1.Set(-.5); - driveboi3.Set(.5); -} -void Robot::Backwards() -{ - driveboi1.Set(.5); - driveboi3.Set(-.5); -} -void Robot::Clock() -{ - driveboi1.Set(.5); - driveboi3.Set(.5); -} -void Robot::CounterClock() -{ - driveboi1.Set(-.5); - driveboi3.Set(-.5); -} -void Robot::Wait(double seconds) -{ - clock_t endwait; - endwait = clock() + seconds * CLOCKS_PER_SEC; - while (clock() < endwait) - { - } -} - #ifndef RUNNING_FRC_TESTS int main() { diff --git a/src/main/cpp/Variables/Variables.h b/src/main/cpp/Variables/Variables.h index 94298e2..abdae00 100644 --- a/src/main/cpp/Variables/Variables.h +++ b/src/main/cpp/Variables/Variables.h @@ -1,103 +1,106 @@ #pragma once #include -//joystick creation -frc::Joystick *lonelyStick; -frc::JoystickButton *nuke; //button 4 -frc::JoystickButton *oneSpin; //button 6 -frc::JoystickButton *lessSpeed; //button 5 -frc::JoystickButton *moreSpeed; //button 3 -frc::JoystickButton *fullCheech; //button 2 -frc::JoystickButton *putItIn; //button 1 - -//tank drive creation -frc::DifferentialDrive *brit; - -//controller creation -frc::XboxController *neighborlyInputDevice; - -//brit motors -rev::CANSparkMax driveboi1(7, rev::CANSparkMax::MotorType::kBrushless); -rev::CANSparkMax driveboi2(10, rev::CANSparkMax::MotorType::kBrushless); -rev::CANSparkMax driveboi3(13, rev::CANSparkMax::MotorType::kBrushless); -rev::CANSparkMax driveboi4(2, rev::CANSparkMax::MotorType::kBrushless); -rev::CANSparkMax driveboi5(8, rev::CANSparkMax::MotorType::kBrushless); -rev::CANSparkMax driveboi6(9, rev::CANSparkMax::MotorType::kBrushless); - -//brit motor groups -frc::SpeedControllerGroup speedyboiL(driveboi1, driveboi2, driveboi3); -frc::SpeedControllerGroup speedyboiR(driveboi4, driveboi5, driveboi6); - -//winch motor creation -rev::CANSparkMax whench(12, rev::CANSparkMax::MotorType::kBrushless); -//climber motor creation -rev::CANSparkMax spoodermoon(11, rev::CANSparkMax::MotorType::kBrushless); -//mike whipper motor creation -ctre::phoenix::motorcontrol::can::VictorSPX whippedCheese = {25}; -//mike whipper up/down solenoid -frc::Solenoid viagra(3); -//intake motor creation -rev::CANSparkMax simp(1, rev::CANSparkMax::MotorType::kBrushless); - -//Encoder creation -rev::CANEncoder spinReader1 = driveboi1.GetEncoder(); -rev::CANEncoder spinReader2 = driveboi2.GetEncoder(); -rev::CANEncoder spinReader3 = driveboi3.GetEncoder(); -rev::CANEncoder spinReader4 = driveboi4.GetEncoder(); -rev::CANEncoder spinReader5 = driveboi5.GetEncoder(); -rev::CANEncoder spinReader6 = driveboi6.GetEncoder(); -//winch encoder creation -rev::CANEncoder pimp = whench.GetEncoder(); -//climber encoder creation -rev::CANEncoder gwen = spoodermoon.GetEncoder(); - -//camera creation -cs::UsbCamera fbi; - -//ultrasonic range sensor creation -frc::AnalogInput batman(0); // 230 - 630 is usable range -//ultrsonic variable -double distance; - -//speed var -double speed; -//auton steps variable thing -enum Auton -{ - forward1 = 1, - dump = 2, - back1 = 3, - turn1 = 4, - forward2 = 5, - back2 = 6, - turn2 = 7, - forward3 = 8, - null = 9 - /*forwardfromside = 10 (for the UltraSonic Side Shot) - turnsideshot = 11 -*/ -}; -Auton step; - -//sonlenoid creation -frc::Solenoid peerPressure1(0); -frc::Solenoid peerPressure2(1); -frc::Solenoid roboMyRio(2); - -//compressor creation -frc::Compressor bonusPressure(0); - -//limit switch creation -frc::DigitalInput stopIt(9); - -//revolution var -int forwardBackwardDistance = 46; //23 is about 5 ft -int turnDistance = 29; //25 is about 360 degrees on shop floors, 29 is about 360 on carpet +// //joystick creation +// frc::Joystick *lonelyStick; +// frc::JoystickButton *nuke; //button 4 +// frc::JoystickButton *oneSpin; //button 6 +// frc::JoystickButton *lessSpeed; //button 5 +// frc::JoystickButton *moreSpeed; //button 3 +// frc::JoystickButton *fullCheech; //button 2 +// frc::JoystickButton *putItIn; //button 1 + +// //tank drive creation +// frc::DifferentialDrive *brit; + +// //controller creation +// frc::XboxController *neighborlyInputDevice; + +// //brit motors +// rev::CANSparkMax driveboi1(7, rev::CANSparkMax::MotorType::kBrushless); +// rev::CANSparkMax driveboi2(10, rev::CANSparkMax::MotorType::kBrushless); +// rev::CANSparkMax driveboi3(13, rev::CANSparkMax::MotorType::kBrushless); +// rev::CANSparkMax driveboi4(2, rev::CANSparkMax::MotorType::kBrushless); +// rev::CANSparkMax driveboi5(8, rev::CANSparkMax::MotorType::kBrushless); +// rev::CANSparkMax driveboi6(9, rev::CANSparkMax::MotorType::kBrushless); + +// //brit motor groups +// frc::SpeedControllerGroup speedyboiL(driveboi1, driveboi2, driveboi3); +// frc::SpeedControllerGroup speedyboiR(driveboi4, driveboi5, driveboi6); + +// //winch motor creation +// rev::CANSparkMax whench(12, rev::CANSparkMax::MotorType::kBrushless); +// //climber motor creation +// rev::CANSparkMax spoodermoon(11, rev::CANSparkMax::MotorType::kBrushless); +// //mike whipper motor creation +// ctre::phoenix::motorcontrol::can::VictorSPX whippedCheese = {25}; +// //mike whipper up/down solenoid +// frc::Solenoid viagra(3); +// //intake motor creation +// rev::CANSparkMax simp(1, rev::CANSparkMax::MotorType::kBrushless); +// rev::CANSparkMax egirl(3, rev::CANSparkMax::MotorType::kBrushless); + +// //Encoder creation +// rev::CANEncoder spinReader1 = driveboi1.GetEncoder(); +// rev::CANEncoder spinReader2 = driveboi2.GetEncoder(); +// rev::CANEncoder spinReader3 = driveboi3.GetEncoder(); +// rev::CANEncoder spinReader4 = driveboi4.GetEncoder(); +// rev::CANEncoder spinReader5 = driveboi5.GetEncoder(); +// rev::CANEncoder spinReader6 = driveboi6.GetEncoder(); + +// //winch encoder creation +// rev::CANEncoder pimp = whench.GetEncoder(); +// //climber encoder creation +// rev::CANEncoder gwen = spoodermoon.GetEncoder(); + +// //camera creation +// cs::UsbCamera fbi; +// cs::UsbCamera cia; + +// //ultrasonic range sensor creation +// frc::AnalogInput batman; // 230 - 630 is usable range +// //ultrsonic variable +// double distance; + +// //speed var +// double speed; +// //auton steps variable thing +// enum Auton +// { +// forward1 = 1, +// dump = 2, +// back1 = 3, +// turn1 = 4, +// forward2 = 5, +// back2 = 6, +// turn2 = 7, +// forward3 = 8, +// null = 9 +// /*forwardfromside = 10 (for the UltraSonic Side Shot) +// turnsideshot = 11 +// */ +// }; +// Auton step; + +// //sonlenoid creation +// frc::Solenoid peerPressure1(0); +// frc::Solenoid peerPressure2(1); +// frc::Solenoid roboMyRio(2); + +// //compressor creation +// frc::Compressor bonusPressure(0); + +// //limit switch creation +// frc::DigitalInput stopIt(9); + +// //revolution var +// int forwardBackwardDistance = 46; //23 is about 5 ft +// int turnDistance = 29; //25 is about 360 degrees on shop floors, 29 is about 360 on carpet //toggle variable for intake things -int toggle = 1; +// int toggle = 1; -//Dead Zone Variables -double lonelyY; -double lonelyTwist; -double notFarEnough; +// //Dead Zone Variables +// double lonelyY; +// double lonelyTwist; +// double notFarEnough; \ No newline at end of file diff --git a/src/main/include/Robot.h b/src/main/include/Robot.h index 732f282..dc6b0f1 100644 --- a/src/main/include/Robot.h +++ b/src/main/include/Robot.h @@ -36,9 +36,9 @@ class Robot : public frc::TimedRobot void RobotInit() override; void RobotPeriodic() override; void AutonomousInit() override; - void AutonomousInit2(); + void AutownInit(); void AutonomousPeriodic() override; - void AutonomousPeriodic2(); + void AutownPeriodic(); void TeleopInit() override; void TeleopPeriodic() override; void TestPeriodic() override; @@ -54,4 +54,106 @@ class Robot : public frc::TimedRobot const std::string kAutoNameDefault = "Default"; const std::string kAutoNameCustom = "My Auto"; std::string m_autoSelected; + + //joystick creation + frc::Joystick *lonelyStick; + frc::JoystickButton *nuke; //button 4 + frc::JoystickButton *oneSpin; //button 6 + frc::JoystickButton *lessSpeed; //button 5 + frc::JoystickButton *moreSpeed; //button 3 + frc::JoystickButton *fullCheech; //button 2 + frc::JoystickButton *putItIn; //button 1 + + //tank drive creation + frc::DifferentialDrive *brit; + + //controller creation + frc::XboxController *neighborlyInputDevice; + + //brit motors + rev::CANSparkMax *driveboi1; + rev::CANSparkMax *driveboi2; + rev::CANSparkMax *driveboi3; + rev::CANSparkMax *driveboi4; + rev::CANSparkMax *driveboi5; + rev::CANSparkMax *driveboi6; + + //brit motor groups + frc::SpeedControllerGroup *speedyboiL; + frc::SpeedControllerGroup *speedyboiR; + + //Encoder creation + rev::CANEncoder spinReader1; + rev::CANEncoder spinReader2; + rev::CANEncoder spinReader3; + rev::CANEncoder spinReader4; + rev::CANEncoder spinReader5; + rev::CANEncoder spinReader6; + + //winch encoder creation + rev::CANEncoder pimp; + //climber encoder creation + rev::CANEncoder gwen; + + //winch motor creation + rev::CANSparkMax *whench; + //climber motor creation + rev::CANSparkMax *spoodermoon; + //mike whipper motor creation + ctre::phoenix::motorcontrol::can::VictorSPX *whippedCheese; + //mike whipper up/down solenoid + frc::Solenoid *viagra; + //intake motor creation + rev::CANSparkMax *simp; + rev::CANSparkMax *egirl; + + //camera creation + cs::UsbCamera fbi; + cs::UsbCamera cia; + + //ultrasonic range sensor creation + frc::AnalogInput *batman; // 230 - 630 is usable range + //ultrsonic variable + double distance; + + //auton steps variable thing + enum Auton + { + forward1 = 1, + dump = 2, + back1 = 3, + turn1 = 4, + forward2 = 5, + back2 = 6, + turn2 = 7, + forward3 = 8, + null = 9 + }; + Auton step; + + //sonlenoid creation + frc::Solenoid *peerPressure1; + frc::Solenoid *peerPressure2; + frc::Solenoid *roboMyRio; + + //compressor creation + frc::Compressor *bonusPressure; + + //limit switch creation + frc::DigitalInput *stopIt; + + //revolution var + int forwardBackwardDistance; + int turnDistance; + + //toggle variable for intake things + int toggle; + + //speed var + double speed; + + //Dead Zone Variables + double lonelyY; + double lonelyTwist; + double notFarEnough; };