[FTC]: IR sensor

just want to see how many people are using the IR sensor and what they are using it for
we did not use it on our robot but I’m going back now and learning more about it and was just wondering what people used it for

We are using two very briefly in autonomous to line up our shooter. Does anyone know how to use the IR seeker to measure distance in ROBOTC?

I suppose you could mount it on it’s side and then it just becomes trigonometry, but the problem will be the large range that is given will make it difficult to triangulate. Also make sure to encorporate the actual sensor values into your design so that it fires when the sensor reads an even number, that should increase accuracy a little more.

IR Seeker Information

I support the ambition of this design idea, but it’s not practical for competition. At Clarkson we found that the majority of robots had no autonomous at all so if you can put balls in the low goal your already ahead of the curve, but if you can put them in the high goal reliably (like our alliance partners harley) you become a sure finalist). From what I’ve seen, from harley’s program you can score in the high goal with completely time based programming, if you make sure to have the right time values. I suggest that you set all time values to variables in your programming so that you can change them quickly. The program will most likely look somewhat like this. Also if you do time based instead of seeker based for competition I would encourage doing so after competition to prepare for the future.

int forward_1 = 0500;
int forward_2 = 1500;
int turn90 = 0250;
int motorspeed = 25;

motor[A] = motorspeed;
motor** = motorspeed;
wait1Msec(forward_1);
motor[A] = -motorspeed;
motor** = motorspeed;
wait1Msec(turn90);
motor[A] = motorspeed;
motor** = motorspeed;
wait1Msec(forward_2);
motor[A] = 0;
motor** = 0;

FIRE!!

The time values are my estimates, but you should change the motorspeed and time values in order to best fit your robot. Also remember you need to test and test for this, but if it’s done, and works, you should jump up to the top of the ranks. In addition just cause your at competition doesn’t mean you can’t tinker. At Clarkson we started off sitting in autonomous and by the end of the day were getting all 8 balls in the low goal (only place our design allowed).

Good Luck!********

What use it for is lineing up as well though more so in autonomous i tell the robot to drive forward and turn until the infared value is 5. drive forward .5 seconds and shoot. I also have a button on the controllers that when next to the goal it automatically lines it up for us so we can fire away.

We used the IR Sensor to tell us when the High Goal had rotated out of our shooting window.