Added an initialize folder in include also set up the color sorter code

This commit is contained in:
Carter committed 2026-08-17 08:53:07 -04:00
1 parent 6be8dd7070
commit bd0e77e240
6 files changed
+153 -1

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#include "main.h"
using namespace ez;
color_sorter::color_sorter(int sensorNum, control_period period, wanted_color selected_color, bool looped) {
while (looped == true) {
if (sensorNum == 1 && period == auton) {
pros::delay(100);
while (colorSensorOne.get_hue() <= 20 || colorSensorOne.get_hue() >= 340) {
//Code you want to execute goes here
looped = false;
}
}
else if (sensorNum == 2 && period== auton) {
pros::delay(100);
while (colorSensorTwo.get_hue() >= 160 && colorSensorTwo.get_hue() <= 280) {
//Code you want to execute goes here
looped = false;
}
}
}
}
+1 -1
View File
@@ -20,7 +20,7 @@ ez::Drive chassis(
// - you should get positive values on the encoders going FORWARD and RIGHT
// - `2.75` is the wheel diameter
// - `4.0` is the distance from the center of the wheel to the center of the robot
// ez::tracking_wheel horiz_tracker(8, 2.75, 4.0); // This tracking wheel is perpendicular to the drive wheels
ez::tracking_wheel horiz_tracker(8, 2.75, 4.0); // This tracking wheel is perpendicular to the drive wheels
// ez::tracking_wheel vert_tracker(9, 2.75, 4.0); // This tracking wheel is parallel to the drive wheels
/**