Intro: Camera Trap: a Trap That Takes a Picture of Whatever Blocks the Laser
We built a camera trap which takes pictures of whatever blocks the laser. A laser pointer and a photoresistor were used to detect blocking. A camera was used to take a picture and send the data back to the Kinoma Create through UART serial ports. Then the picture was sent to the laptop and stored into a folder.
A laser pointer and a photoresistor were used to detect blocking. A serial camera was used to take pictures.
Step 1: Polling the Laser
We use a handler to poll the voltage reading of pin 47. Whenever the voltage is higher than the threshold, it calls the “takePicture” method to take a picture. We implemented a loop by the “time1” handler and the “delay1” handler calling each other.
Step 2: Capture From the Camera and Save to JPEG
After a new picture was successfully uploaded from the camera to the Create, a request would be sent from laptop side and fetch the picture back in the format of a Chunk.
Step 3: Wire the Photo Resistor and Set Up the Project
We first connect the photo resistor to a pull up resistor. The junction where the resistor and photoresistor meet goes to pin 47. Serial camera should be connected to the Create. Then, we adjust the laser pointer to point at the photo resistor.
Step 4: Finish
After we finish all the above steps, we assemble all parts together and upload the program to the Kinoma Create. Then we run the laptop side program in the simulator. Now, a camera trap is set up.
You’ve done it! Or if you got stuck along with way, we’re here to help — come visit us at our forum and let us know how we can help.