Search
  • Oscar Fraxedas

Raspberry Pi camera and servos


You just got a raspberry pi and are in the mood for some hacking.

Let’s try a “simple” project to take a panoramic photo.

You’ll need additional parts:

Some software to combine the photos:

Some code to control servos and take photos:

The camera module is able to take 5 megapixels still photos, which is not a lot nowadays. By taking multiple photos and moving the camera around with the servos you’ll create a panorama or a photosphere.

You can use the GPIO pins to control and power the servos. Pins 7 and 18 will work for PWM. Use a couple of 5V pins for power.

After the wiring is done ssh into the Rpi and run the following:

$ git clone https://github.com/fraxedas/pinorama.git

$ cd pinorama/scripts

$ source panorama.sh

The script will run on a loop, taking photos and moving the camera to a different angle as shown in the video:


After all the photos are taken, use hugin to combine them.

If you do the whole project, please add the link to the final photo to the comments.

This is a nice hack project, but if you want to get serious about controlling servos with the RPi please review https://learn.adafruit.com/adafruit-16-channel-pwm-servo-hat-for-raspberry-pi/powering-servos

#IoT #raspberrypi #camera #servo

9 views

©2018 by Lean Cycle Inc