This tutorial shows how to add a camera to an existing BluPants robot. If you don't have your robot yet, please visit our previous tutorials to get one working:
After adding the camera to your robot, the final result should be similar to this:
We have a couple of challenges you can do with your new bot. Find them at our lessons page. Other than the basic drag and drop coding blocks shown, it also natively supports Python for more advanced students. For more information about BluPants visit www.blupants.com or watch our Intro to BluPants video.
PartsFor this tutorial, we are going to add the camera to an existing claw/gripper robot with the distance sensor as a base robot. You can find the tutorial to assemble the base robot here. Other than the existing robot, we are going to need the additional parts shown below:
We are using tape to fix the camera to the bracket kit. You may want to put your camera somewhere else in your project and/or not even use a Pan-tilt kit to mount the camera.
Check the attached file "SG90_PanManual.pdf" for instructions on how to assemble the bracket kit. After assembling, it should look like this:
I used tape and sewing threads to attach the camera module to the bracket kit.
Connect the jumper wires to the servos. I used male-to-male brown jumper for Gnd, male-to-male red jumper for Vcc, and male-to-female orange jumper for signal. Please, refer to your servo manual for your pinout. Yours might be different.
Attach the bracket kit to the front of your robot chassis.
Open the camera slot on the Raspberry Pi board, connect the camera tape and close the slot.
Connect the two brown jumpers (servo Gnd) to the "-" rail on the breadboard. Connect the two red jumpers (servo Vcc) to the "+" rail on the breadboard.
Connect the signal jumpers (orange) to the Raspberry Pi. The signal jumper from the servo on the bottom (horizontal) connects to GPIO27 and the signal jumper from the servo on the top (vertical) connects to GPIO22.
And that's it. Once you turn on your robot and connect it to the BluPants Studio IDE, you should be able see your live camera video stream.
Comments