Hooking an Optek motion detector to a Basic Stamp 2

I was at this past week’s Club meeting, and I’m afraid I took very poor notes and so subsequently I’m suffering from my own laziness, so all due apologies to everybody who’s already tried to help me.

I was gifted with a very generous selection of Optek slotted switches to see if I could adapt one to serve as a coin-operable machine activator (letting a nickel pass through its slot to activate my device).

I was given the circuit schematic rudiments of this, but unfortunately I just didn’t write it down effectively, probably I was somehow thinking I could cobble it together more effectively later. mea culpa, this is a mistake I will not make again.

However, I could use some help in setting this thing up, if for no other reason than to test and see what feedback my setup will get from the sensor.

I am using a Basic Stamp 2 microcontroller. I could use some more specifics on just how to hook this thing up to the BS2 and perhaps some lead on how to go about scripting the most basic code for recognizing and interpreting a signal from the thing to make sure it’s operating.

Right now, the sensor would be the only thing hooked up to the BS2, so there’s no issue at present of having to specify where it needs to go–if you can offer me some help on this, I can follow instructions to the letter.

Thanks again, I appreciate any and all help.