Use of the Line Following Sensor from last year?

We are using a belt to run basketballs up to the shooter part of our robot for this year. We are planning on using the line following sensor from last year to determine when there is a ball in place. Mechanical insists that it is possible (and I think it is too), but I am not sure how to do this exactly.

Any help or ways to get me started would be useful.


Maybe a limit switch or even sonar sensors would work better, line trackers tend to be unreliable when there isn’t a big light difference and when the lighting isn’t exactly right

That’s my thought too, although the mech head insists it can be done, so I will show him for tomorrow, and we can see.

Thanks for the advice though, and I think I figured out the code anyway.


Best thing to do would be to set up a line sensor, plop a ball in front of it, and play with the line sensor adjustment to see if you can reliably get it to detect a ball and not anything else. It won’t take long at all and it’ll give you a definite answer. Please let us know what you find out :slight_smile:

The best way that I can think to do it is it you put some sort of light near the sensor so your not relying on ambient light which will always be changing

The sensor has its own IR emitter.

Oh, right what am I thinking. Too late at night lol. There are still a lot of other variables tho, but I would be interested to see your results from test. Our team will probably be using limit switched tho is i think it will be more reliable

Happens :slight_smile: And yes there definitely are, the biggest problem I’d see with it would be ambient light interfering with it, and the spherical shape of the balls. You’d probably need to make some sort of dark chamber for them to pass into with the line sensor.

Limit switches would probably be my preference too, as with that kind of mechanical solution there seems to be a lot less margin for error (unless the squishyness of the balls presents you with issues triggering it or something), and with something like ball collection where accidentally grabbing extra balls could cost you a penalty, I’d rather be safe than sorry.

Also, not to mention the black lines on the balls might cause some problems.

Yeah, that too. It really just doesn’t seem like a very appropriate use for the line sensors; sure, you might be able to shoehorn them on, but does it make sense?