diff --git a/include/EZ-Template/color_sorter.hpp b/include/EZ-Template/color_sorter.hpp index ca00fd1..aa4b374 100644 --- a/include/EZ-Template/color_sorter.hpp +++ b/include/EZ-Template/color_sorter.hpp @@ -6,12 +6,16 @@ #include "pros/colors.hpp" namespace ez { - + /** + * Structure to hold two optical sensor pointers. + */ struct OpticalSensors { pros::Optical* leftColorSensor; pros::Optical* rightColorSensor; }; - + /** + * Enumeration to hold colors we want to select. + */ enum wanted_color { red, blue, @@ -19,32 +23,45 @@ namespace ez { green, purple }; - + /** + * Enumeration to hold the two different time of a match. + */ enum control_period { driver, auton }; - + /** + * Color sensor class + */ class ColorSensors { private: public: - + int led_brightness; + ColorSensors(); /** - * - * \param sensorNum + * Creates a color sorter to allow you to detect colors with sensors + * + * \param c_sensor * the sensor we want to use for the reading * \param period * the current control period where in * \param selected_color * the color we want to look for + * \param led_brightness + * sets the how bright the leds are on the sensors * \param looped * do we want to continusly check for that color */ - void color_sorter(const OpticalSensors& c_sensor, control_period period, wanted_color selected_color, bool looped); + void color_sorter(pros::Optical* c_sensor, control_period period, wanted_color selected_color, int led_brightness, bool looped); void DisplayColor(); }; + /** + * Declares a variable that can be used anywhere to access information + * from inside the structure. + */ + extern OpticalSensors mySensors; }; \ No newline at end of file diff --git a/include/EZ-Template/mechanisms.hpp b/include/EZ-Template/mechanisms.hpp index 6cd6620..363da47 100644 --- a/include/EZ-Template/mechanisms.hpp +++ b/include/EZ-Template/mechanisms.hpp @@ -6,40 +6,60 @@ #include "pros/motor_group.hpp" namespace ez { - + /** + * Enumeration to hold the current part of a match were in. + */ enum class ControlPeriodM { driver, auton }; - + /** + * Enumeration to hold the different controllers avalable. + */ enum class ControllerM { master, slave }; - + /** + * Enumeration to hold the different buttons to use. + */ enum class ButtonsM { arrow_buttons, Y_B_buttons, left_shoulder_buttons, right_shoulder_buttons }; - + /** + * Enumeration to hold all the motors and motor groups available + */ enum class MotorGroups { lift_MG, claw_M, roller_M }; - + /** + * Motor mechanism class + */ class Mechanisms { - private: public: float fw_motor_speed = 0; float rev_motor_speed = 0; - + + /** + * Default constructor + */ Mechanisms(); + /** + * Allows you to control your motors + * + * \param controlPeriodM + * The current control period were in + * + * + */ void motor_control(enum ControlPeriodM, enum ControllerM, enum ButtonsM, enum MotorGroups, float fw_motor_speed, float rev_motor_speed); float get_motor_speed(); diff --git a/include/EZ-Template/pneumatics.hpp b/include/EZ-Template/pneumatics.hpp index deff142..eaa4cd8 100644 --- a/include/EZ-Template/pneumatics.hpp +++ b/include/EZ-Template/pneumatics.hpp @@ -6,7 +6,7 @@ #include "EZ-Template/piston.hpp" namespace ez { - /** + /** * Enumeration to hold the current part of a match were in. */ enum class ControlPeriodP { @@ -37,7 +37,6 @@ namespace ez { }; class Pneumatics{ - private: bool pistonState; diff --git a/include/autons.hpp b/include/autons.hpp index 46c1ce8..fa37707 100644 --- a/include/autons.hpp +++ b/include/autons.hpp @@ -5,14 +5,14 @@ void default_constants(); /** * Personal auton routes */ -void leftMain(std::string side); -void rightMain(std::string side); -void Skills(); -void BlueRight(); -void BlueLeft(); -void RedRight(); -void RedLeft(); -void testMain(std::string side); +void quick_right_blue(); +void quick_right_red(); +void blue_left_3pin(); +void blue_right_4pin(); +void blue_right_3pin(); +void red_left_3pin(); +void red_right_3pin(); +void red_right_4pin(); void Test(); /** diff --git a/project.pros b/project.pros index e57942d..b0a31b5 100644 --- a/project.pros +++ b/project.pros @@ -402,7 +402,7 @@ "compress_bin": true, "description": "", "remote_name": "EZ-Template", - "slot": 1, + "slot": 3, "icon": "pizza" }, "use_early_access": false diff --git a/src/EZ-Template/color_sorter.cpp b/src/EZ-Template/color_sorter.cpp index ce37d01..7fe3bd1 100644 --- a/src/EZ-Template/color_sorter.cpp +++ b/src/EZ-Template/color_sorter.cpp @@ -4,45 +4,64 @@ using namespace ez; ColorSensors::ColorSensors() {} -void ColorSensors::color_sorter(const OpticalSensors& c_sensor, control_period period, wanted_color selected_color, bool looped) { +/** + * Coler sorter function, allows you to take the value of a sensor + * and complete a task based on the selected color. + */ +void ColorSensors::color_sorter(pros::Optical* c_sensor, control_period period, wanted_color selected_color, int led_brightness, bool looped) { + // Sets the sensors leds to a certain brightness + c_sensor->set_led_pwm(led_brightness); + colorSensorTwo.set_led_pwm(led_brightness); + + // loop that makes sure sensor values are always being updated and the function doesn't exit till a result is reached + while (looped == true) { + // Gets the current color of the selected sensors + double main_hue = c_sensor->get_hue(); + double backup_hue = colorSensorTwo.get_hue(); + + // Makes a bool value to turn true when it sees blue + bool main_is_blue = (main_hue >= 160 && main_hue <= 280); + bool backup_is_blue = (backup_hue >= 160 && backup_hue <= 280); + + // Makes a bool value to turn true when is ses red + bool main_is_red = (main_hue <= 20 || main_hue >= 340); + bool backup_is_red = (backup_hue <= 20 || backup_hue >= 340); + + // A switch to easily check what color we want to look for + switch (selected_color) + { + case wanted_color::blue: + // If both sensors see the same color exit the loop and stop doing the code + if (main_is_blue == true && backup_is_blue == true) { + roller.move(0); + looped = false; + } + else { + // Code to run when the sensors don't see the right color + roller.move(60); + } + break; + + case wanted_color::red: + // If both sensors see the same color exit the loop and stop doing the code + if (main_is_red == true && backup_is_red == true) { + roller.move(0); + looped = false; + } + else { + // Code to run when the sensors don't see the right color + roller.move(65); + } + break; + + default: + break; + } + pros::delay(100); // Delay to allow the cpu to catch up + } } -/* - -void Opticalcarter::color_sorter(control_period period, wanted_color selected_color, bool looped) { - switch (selected_color) - { - case wanted_color::blue: - while (looped == true) { - pros::delay(100); - while (!colorSensorOne.get_hue() >= 160 && !colorSensorOne.get_hue() <=280 && !colorSensorTwo.get_hue() >= 160 && !colorSensorTwo.get_hue() <=280) { - roller.move(127); - if (colorSensorOne.get_hue() >= 160 && colorSensorOne.get_hue() <=280 && colorSensorTwo.get_hue() >= 160 && colorSensorTwo.get_hue() <=280) { - roller.move(0); - looped = false; - } - } - } - break; - case wanted_color::red: - while (looped == true) { - pros::delay(100); - while (!colorSensorOne.get_hue() <= 20 || !colorSensorOne.get_hue() >=340 && !colorSensorTwo.get_hue() <= 20 || !colorSensorTwo.get_hue() >=340) { - roller.move(127); - if (colorSensorOne.get_hue() <= 20 || colorSensorOne.get_hue() >=340 && colorSensorTwo.get_hue() <= 20 || colorSensorTwo.get_hue() >=340) { - roller.move(0); - looped = false; - } - } - } - break; - - default: - break; - } -}*/ - /*while (looped == true) { if (sensorNum == 1 && period == auton) { pros::delay(100); diff --git a/src/autons.cpp b/src/autons.cpp index c1b4842..1e43af9 100644 --- a/src/autons.cpp +++ b/src/autons.cpp @@ -11,6 +11,9 @@ const int DRIVE_SPEED = 110; const int TURN_SPEED = 90; const int SWING_SPEED = 110; +//Default Objects +ColorSensors sorter; + /// // Constants /// @@ -52,7 +55,534 @@ void default_constants() { /// // Custom auton routes // +void quick_right_blue() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::blue, 100, true); + + lift.move(80); + pros::delay(420); + lift.move(0); + chassis.pid_swing_set(ez::RIGHT_SWING, -59.3_deg, SWING_SPEED, -7); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(15.7_in, 100, true); + chassis.pid_wait_until(9_in); + chassis.pid_speed_max_set(30); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-30); + pros::delay(110); + lift.move(0); + claw.move(90); + lift.move(-30); + pros::delay(100); + lift.move(0); + pros::delay(500); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait_quick_chain(); +} + +void quick_right_red() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::red, 100, true); + + lift.move(80); + pros::delay(420); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -59.6_deg, SWING_SPEED, -7); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(15.7_in, 100, true); + chassis.pid_wait_until(9_in); + chassis.pid_speed_max_set(30); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-30); + pros::delay(110); + lift.move(0); + claw.move(90); + lift.move(-30); + pros::delay(100); + lift.move(0); + pros::delay(500); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait_quick_chain(); +} + +void blue_left_3pin() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::blue, 100, true); + + lift.move(80); + pros::delay(420); + lift.move(0); + + chassis.pid_swing_set(ez::LEFT_SWING, 60_deg, SWING_SPEED, -7); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(15.7_in, 100, true); + chassis.pid_wait_until(9_in); + chassis.pid_speed_max_set(30); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-30); + pros::delay(110); + lift.move(0); + claw.move(90); + lift.move(-30); + pros::delay(100); + lift.move(0); + pros::delay(500); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::LEFT_SWING, 20_deg, SWING_SPEED, -0); + chassis.pid_wait(); + + claw.move(-127); + lift.move(-80); + pros::delay(200); + lift.move(0); + + chassis.pid_drive_set(18_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::LEFT_SWING, 40_deg, 60, 7); + chassis.pid_wait(); + + lift.move(100); + pros::delay(200); + lift.move(0); + pros::delay(300); + + chassis.pid_turn_set(-112.4_deg, TURN_SPEED); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(30_in, DRIVE_SPEED); + chassis.pid_wait(); + + lift.move(100); + pros::delay(900); + lift.move(0); + + chassis.pid_drive_set(5_in, 70); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-50); + pros::delay(100); + claw.move(127); + pros::delay(500); + lift.move(0); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait(); +} + +void blue_right_4pin() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::blue, 100, true); + + lift.move(80); + pros::delay(420); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -59.3_deg, SWING_SPEED, -7); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(15.7_in, 100, true); + chassis.pid_wait_until(9_in); + chassis.pid_speed_max_set(30); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-30); + pros::delay(110); + lift.move(0); + claw.move(90); + lift.move(-30); + pros::delay(100); + lift.move(0); + pros::delay(500); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::RIGHT_SWING, -20_deg, SWING_SPEED, -0); + chassis.pid_wait(); + + claw.move(-127); + lift.move(-80); + pros::delay(200); + lift.move(0); + + chassis.pid_drive_set(18_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::RIGHT_SWING, -40_deg, 60, 7); + chassis.pid_wait(); + + lift.move(100); + pros::delay(1000); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -210_deg, SWING_SPEED, -20); + chassis.pid_wait_quick_chain(); + + chassis.pid_turn_set(-215_deg, SWING_SPEED); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(10_in, 100); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-50); + pros::delay(100); + claw.move(127); + pros::delay(500); + lift.move(0); + + chassis.pid_drive_set(-3_in, 80); + chassis.pid_wait_quick_chain(); + + lift.move(-80); + pros::delay(200); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -134_deg, SWING_SPEED, -30); + chassis.pid_wait(); + + claw.move(-127); + + chassis.pid_drive_set(12_in, 100); + chassis.pid_wait(); + + lift.move(80); + pros::delay(350); + lift.move(0); + claw.move(0); + pros::delay(150); + + chassis.pid_swing_set(ez::RIGHT_SWING, -280_deg, SWING_SPEED, 0); +} + +void blue_right_3pin() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::blue, 100, true); + + lift.move(80); + pros::delay(420); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -59.5_deg, SWING_SPEED, -7); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(15.7_in, 100, true); + chassis.pid_wait_until(9_in); + chassis.pid_speed_max_set(30); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-30); + pros::delay(110); + lift.move(0); + claw.move(90); + lift.move(-30); + pros::delay(100); + lift.move(0); + pros::delay(500); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::RIGHT_SWING, -20_deg, SWING_SPEED, -0); + chassis.pid_wait(); + + claw.move(-127); + lift.move(-80); + pros::delay(200); + lift.move(0); + + chassis.pid_drive_set(18_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::RIGHT_SWING, -40_deg, 60, 9); + chassis.pid_wait(); + + lift.move(100); + pros::delay(200); + lift.move(0); + pros::delay(300); + + chassis.pid_turn_set(112.4_deg, TURN_SPEED); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(31_in, DRIVE_SPEED); + chassis.pid_wait(); + + lift.move(100); + pros::delay(900); + lift.move(0); + + chassis.pid_drive_set(5_in, 70); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-50); + pros::delay(100); + claw.move(127); + pros::delay(500); + lift.move(0); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait(); +} + +void red_left_3pin() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::red, 100, true); + + lift.move(80); + pros::delay(420); + lift.move(0); + + chassis.pid_swing_set(ez::LEFT_SWING, 60_deg, SWING_SPEED, -7); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(15.7_in, 100, true); + chassis.pid_wait_until(9_in); + chassis.pid_speed_max_set(30); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-30); + pros::delay(110); + lift.move(0); + claw.move(90); + lift.move(-30); + pros::delay(100); + lift.move(0); + pros::delay(500); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::LEFT_SWING, 20_deg, SWING_SPEED, -0); + chassis.pid_wait(); + + claw.move(-127); + lift.move(-80); + pros::delay(200); + lift.move(0); + + chassis.pid_drive_set(18_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::LEFT_SWING, 40_deg, 60, 8); + chassis.pid_wait(); + + lift.move(100); + pros::delay(200); + lift.move(0); + pros::delay(300); + + chassis.pid_turn_set(-112.4_deg, TURN_SPEED); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(30_in, DRIVE_SPEED); + chassis.pid_wait(); + + lift.move(100); + pros::delay(900); + lift.move(0); + + chassis.pid_drive_set(5_in, 70); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-50); + pros::delay(100); + claw.move(127); + pros::delay(500); + lift.move(0); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait(); +} + +void red_right_3pin() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::red, 100, true); + + lift.move(80); + pros::delay(420); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -59.3_deg, SWING_SPEED, -7); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(15.7_in, 100, true); + chassis.pid_wait_until(9_in); + chassis.pid_speed_max_set(30); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-30); + pros::delay(110); + lift.move(0); + claw.move(90); + lift.move(-30); + pros::delay(100); + lift.move(0); + pros::delay(500); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::RIGHT_SWING, -20_deg, SWING_SPEED, -0); + chassis.pid_wait(); + + claw.move(-127); + lift.move(-80); + pros::delay(200); + lift.move(0); + + chassis.pid_drive_set(18_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::RIGHT_SWING, -40_deg, 60, 8); + chassis.pid_wait(); + + lift.move(100); + pros::delay(200); + lift.move(0); + pros::delay(300); + + chassis.pid_turn_set(112.4_deg, TURN_SPEED); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(30_in, DRIVE_SPEED); + chassis.pid_wait(); + + lift.move(100); + pros::delay(900); + lift.move(0); + + chassis.pid_drive_set(5_in, 70); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-50); + pros::delay(100); + claw.move(127); + pros::delay(500); + lift.move(0); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait(); +} + +void red_right_4pin() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::red, 100, true); + + lift.move(80); + pros::delay(420); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -59.3_deg, SWING_SPEED, -7); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(15.7_in, 100, true); + chassis.pid_wait_until(9_in); + chassis.pid_speed_max_set(30); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-30); + pros::delay(110); + lift.move(0); + claw.move(90); + lift.move(-30); + pros::delay(100); + lift.move(0); + pros::delay(500); + + chassis.pid_drive_set(-3_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::RIGHT_SWING, -20_deg, SWING_SPEED, -0); + chassis.pid_wait(); + + claw.move(-127); + lift.move(-80); + pros::delay(200); + lift.move(0); + + chassis.pid_drive_set(18_in, 100); + chassis.pid_wait_quick_chain(); + + chassis.pid_swing_set(ez::RIGHT_SWING, -40_deg, 60, 7); + chassis.pid_wait(); + + lift.move(100); + pros::delay(1000); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -210_deg, SWING_SPEED, -20); + chassis.pid_wait_quick_chain(); + + chassis.pid_turn_set(-215_deg, SWING_SPEED); + chassis.pid_wait_quick_chain(); + + chassis.pid_drive_set(10_in, 100); + chassis.pid_wait(); + + pros::delay(200); + lift.move(-50); + pros::delay(100); + claw.move(127); + pros::delay(500); + lift.move(0); + + chassis.pid_drive_set(-3_in, 80); + chassis.pid_wait_quick_chain(); + + lift.move(-80); + pros::delay(200); + lift.move(0); + + chassis.pid_swing_set(ez::RIGHT_SWING, -134_deg, SWING_SPEED, -30); + chassis.pid_wait(); + + claw.move(-127); + + chassis.pid_drive_set(12_in, 100); + chassis.pid_wait(); + + lift.move(80); + pros::delay(350); + lift.move(0); + claw.move(0); + pros::delay(150); + + chassis.pid_swing_set(ez::RIGHT_SWING, -280_deg, SWING_SPEED, 0); +} +void blue_wp() { + +} + +void red_wp() { + +} + +void skills() { + +} + +void Test() { + sorter.color_sorter(mySensors.leftColorSensor, control_period::auton, wanted_color::blue, 100, true); +} /// // Drive Example diff --git a/src/main.cpp b/src/main.cpp index 16ce39b..5f4fdc7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,7 +9,7 @@ ez::Drive chassis( 6, // IMU Port 3.25, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!) - 360.0); // Wheel RPM = cartridge * (motor gear / wheel gear) + 450.0); // Wheel RPM = cartridge * (motor gear / wheel gear) // Uncomment the trackers you're using here! // - `8` and `9` are smart ports (making these negative will reverse the sensor) @@ -24,6 +24,20 @@ Pneumatics pistonControl; Mechanisms motorControl; //ArmMech armObj; +/** + * This is creating and initializing and instance of the Optical sensors structure + * + * Finds the memory location of the two color sensors, which then the "mySensors" container + * gives to the pointers. So now the pointers have somewhere to point to in memory. + */ +namespace ez { + // Initializes the mySensors variable + OpticalSensors mySensors = { + // This is where color sensors go. + &colorSensorOne, + &colorSensorTwo + }; +} // Lift constructor /*LiftMech liftObj( @@ -96,7 +110,15 @@ void initialize() { // Autonomous Selector using LLEMU ez::as::auton_selector.autons_add({ //Custom autonomouse routes go here. - + {"Quick right blue\n\n1 pins on 1 goals", quick_right_blue}, + {"Quick right red\n\n1 pins on 1 goals", quick_right_red}, + {"Blue Left\n\n3 pins on 2 goals", blue_left_3pin}, + {"Blue Right\n\n4 pins on 2 goals", blue_right_4pin}, + {"Blue Right\n\n3 pins on 2 goals", blue_right_3pin}, + {"Red Left\n\n3 pins on 2 goals", red_left_3pin}, + {"Red Right\n\n3 pins on 2 goals", red_right_3pin}, + {"Red Right\n\n4 pins on 2 goals", red_right_4pin}, + {"Test\n\nTest testing", Test}, /*{"Drive\n\nDrive forward and come back", drive_example}, {"Turn\n\nTurn 3 times.", turn_example},