Counting Question

I am new to the Arduino. I know little about it and what all it can do. I have a counting question. I am looking to count parts moving on a flat belt. The parts for each run are different sizes. So I'm looking for a way to time how long the input is turned on. So if the input is on for 100 ms it would sends one pulse, but if its on for 200ms it would send 2 pulses. Or is there a better way to do this?
Also I would need to make the time adjustable with a pot or something like that.

Could anyone tell me if that is something the Arduino could do?

I want to get an Arduino. They sound like they are fun to work with.

Thanks for your time looking at this post!
Rusty

Could anyone tell me if that is something the Arduino could do?

Yes, easily.

One way would be to detect when an object interrupts a light beam and save the time that it happens. Then, when the object has passed save the time at which the interruption of the light beam stops. You now have the start and end time to do anything that you need to. For instance, if you know the speed that the objects are passing the light beam then you could calculate their size and trigger outputs based on the size.

Great!! Thanks UKHeliBob! Maybe this is what I've been looking for to compete my project. Time to start learning Arduino. :slight_smile: