Camera API
Based on a tutorial originally by Nate Robins.
Here is the function that sets up this camera: