Make: Virtual Reality Controlled Camera

This is just a really quick blog post about how I created the virtual reality controlled camera… it’s not a full guide, I’ll update it soon!


  1. A raspberry pi
  2. A pan tilt hat
  3. A raspberry pi camera
  4. A smartphone that has a tilt sensor and can access thternet
  5. A virtual reality headset (can be a poundland one!)

It works with any phone that has a tilt sensor and can access website. I used it with a pound shop virtual cardboard headset!

How it works:

  • The raspberry pi is running it’s own wi-fi access point. It has a web server on it with a page created by Pi Viewer.
  • The phone connects to that access point and goes to the webpage.
  • The webpage detects the motion of the phone through JavaScript
  • A python script gets the data from the webpage and moves the pan tilt servos accordingly.
  • The code is on github:

You need to install the twisted webserver using:

sudo pip install twisted


and the Pimoroni Pan Tilt Hat library:

curl | bash

This code was part of a robot car so does include some robot code called agobo and might have some wii remote libraries there too. But it works!


One thought on “Make: Virtual Reality Controlled Camera

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s