I wanted a tripwire. This is just the circuit and the code, you can use it for quite a few things, like a trigger for a camera, or you could make it shut down your computer if someone crosses it.
When I have the time, I want to hook it up to an electric airsoft gun with a relay and have it shoot you when you break the beam. I suppose I'll add to the Instructable when that happens.
So let's start!
Step 1: Components Needed
-Photo resistor (Practically any value will work, the program will just need to be changed slightly)
Step 2: Circuit
Connect one leg of the photoresistor to Analog Input 0, and the other leg to +5v. Then, take the 10K resistor and connect one leg to GND (ground) and the other to Analog Input 0.
Also, I wired an LED to Digital I/O pin 13 to show when the laser beam is broken.
Step 3: The laser pointer
1) Remove the end cap and take out the batteries.
2) Inside there should be a spring, connect one of the alligator clips to this spring.
3) My laser pointer (and all of the others I have seen) have a completed circuit when the end cap is on, so I connected the other alligator clip to the bit of metal on the inside of the laser pointer.
4) Connect one of the alligator clips to GND, and the other to pin 4 (or any pin, so that you can control the laser).
5) Lastly, use masking tape to tape down the button so the laser pointer is always on.