This is the code we used to make various break beam sensor projects culminating with a Light Gate to measure acceleration in our physics experiments. The projects can be made for very little money.
Part of the point was understanding the code, so there are various versions for everyone to hack around with.
