17 if (
controller.get_digital(pros::E_CONTROLLER_DIGITAL_L1)) {
20 }
else if (
controller.get_digital(pros::E_CONTROLLER_DIGITAL_R1)) {
37 bool red = color < 30.0 && color >= 0.0 || color > 330.0 && color <= 359.999;
38 bool blue = color > 200.0 && color < 230.0;
41 red = color < 30.0 && color >= 0.0 || color > 330.0 && color <= 359.999;
42 blue = color > 200.0 && color < 230.0;
void score()
Outakes alliance rings into latched mobile goal and ejects enemy rings.
void toggle()
Toggles intake elevation.
bool alliance_color
blue is false, red is true.
void run()
Runs the main function of the intake system.
pros::Motor IntakeMotor(-9, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
pros::Optical colorSensor(4)
pros::Motor HookMotor(4, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
pros::adi::Pneumatics IntakeToggle('B', false)
pros::Controller controller(pros::E_CONTROLLER_MASTER)