Turntable Disk Documentation
Collaboratory Turntable Disk Documentation
Table of contents
- Setting up the Turn Table
- Operating the Turn Table
- Accessing the Development Environment
- The Pi's File System
- Editing Files (Using Emacs)
- Credits
Setting up the Turn Table
As of now, the Turn Table is located in the Wild Alaskan The Ultimate Fish Stick™ box stored in the storage closet near Chris' office.To set up the Turn Table, do the following:
- Take out the Turn Table base and place it on a flat surface
- Find the AC/DC Adjustable Voltage Adapter, and plug it into the breadboard (it's offwhite and has many wires plugged into it)
- Adjust the voltage of the adapter to ~7-7.5V
- Find the Micro-USB, and plug it into the Raspberry Pi (this will turn on the Pi's server)
- Plug in your camera into the Raspberry Pi
- Take out the Turn Table "plate," covered in translucent white paper
- Place the plate onto the base
- Now your set-up should be complete
Operating the Turn Table
Connecting to the Pi
When you plug in the Pi, it will begin transmitting its own WiFi network. Connecting to this network allows you to access the Pi, its data, and the WebUI used to operate the Turn Table.Here are the network details:
- SSID (WiFi network name): arthpi-net
- WPA-PSK (WiFi Password): AVeryGoodPassword
Accessing the WebUI
While connected to arthpi-net on your device, go to http://turn.table:5000.Additionally, you may use the IP Address: http://192.168.4.1:5000.
Using the WebUI
There are 2 things you can currently do with the WebUI:- Take a photoset
- There are a few things you can configure in this menu:
- The number of photos in a photoset
- The Turn Table will always complete an entire 360, and the angular distance moved between photocaptures will update depending on the number of photos
- The name of the photoset currently does nothing, it's a legacy option for when photos were stored onto the Pi itself
- The pass number also does nothing at the moment
- The stepping frequency how often the motor takes a single step. I'd recommend sticking to 512
- The number of photos in a photoset
- It takes about 4 minutes for a 36 photo photoset to complete
- The lights sometimes don't work for a few pictures in the photoset
- Do not click the start rotation button more than once. It will start randomly rotating the disk, taking pictures, and flashing the lights
- Do not take pictures without the camera plugged into the Pi.
- There are a few things you can configure in this menu:
- Taking test shots
- You can do a few things in this menu:
- Assign your test shot a title
- Take a photo
- Rotate the disk
- You can rotate the disk 10, 30, 90, or 180 degrees clockwise
- The disk only supports clockwise rotation, since the gear only rotates clockwise
- You can do a few things in this menu:
Accessing the Photos
- Once you're done taking a photoset, the photos will be saved onto the camera. Unplug the camera from the Pi and plug it into the laptop
- Open the file explorer, you'll find connected to your PC is a camera
- Turn off Helicon's Live View, and open up the camera on your file explorer
- From there, you can copy and paste your photoset to your desired location on the laptop (it might take some time)
Accessing the Development Environment
The main way to access the devlopment environment is via a remote connection to the SSH server hosted by the Pi.Here's how:
- Open up a terminal of your choosing (I prefer PowerShell on Windows)
- Enter
"ssh pi@turn.table" - Enter "vegvegveg" for the password
Additional Tidbits:
- Connecting a monitor and keyboard to the Pi allows you to connect to the Pi's development environment as well
- Connecting an ethernet cable allows you to do the same from your laptop
- VSCode's remote SSH used to actually work with the Raspberry Pi, but stopped working after an update a few years ago
- It might be worth it to look into this in the future!
- This unfortunately means we must use Emacs on the command line to edit Files
- More information can be found here
The Pi's File System
Congratulations on making it this far! Now you should be face to face with the Pi's file system.Here's an overview on how to navigate the file system:
- You should now be in the
pi@turntable:~directory, which is the Linux name for a folder. - You can see the contents of the directory you're currently located in with
ls. cdis used to enter a directory, ex."cd foo"places you in the foo directory- To observe the contents of a file, use
cat {filename} - To exit a directory, use
cd ..
How to get to where the Python, CSS, and HTML code is located:
- Use the command
"cd arth". - Now use
"cd webui" - Now use
"ls"
A run through of all relevant files/directories in arth/webui:
app.py- The Python file containing the functionality for the WebUI
- This app uses Flask, a library allowing Python to communicate with the webpage.
stepper_script.py- Manages the rotation of the and phototaking.
- This script saves the photos onto the camera
templates- This directory contains all the relevant HTML code called by
app.py templates/pagescontains the home pagetemplates/layoutscontains other pages found only by menuingtemplates/errorscontains error pagestemplates/formscontains response pages for the requests made in forms
- This directory contains all the relevant HTML code called by
staticstatic/csscontains all the CSS files used in the webpage- The WebUI uses Bootstrap, a front-end web framework, to make the HTML look prettier
- Other CSS files can be found here, as well
static/fontscontains the font files used in the WebUIstatic/icocontains favicons for the webpage (the icon shown on the tab)
backupbackupcontains backups of important files inwebui.
legacylegacycontains legacy code from before I updated the code to work with the new camera- It contains old versions all of the files in the
webuidirectory, including other scrapped functionality legacy/eileentest.py- A test made by a former Collaboratory intern, Eileen
- This attempts to find out if a USB device is connected to the Pi, and tries to access its directory
models.py- Legacy code from when there used to be a log-in system
- Any file ending in
~is an older version of another file in the directory - There are many legacy versions of
app.py appOriginalCopy.piapp.pyand its variationsappTest.pyand its variationsconfig.py- Legacy code that setup the connection to a database for the proposed log-in system
stepper_script.pystepper_script.py~contains the version of the stepper script that saved photos onto the Pi
forms.py- Manages the forms on the WebUI
SelectCameraFieldForm- Allows you to adjust the camera settings
- Doesn't work as intended when a camera isn't plugged in
TakeTurntablePsetFormallows you to adjust your photoset settings before taking photosget_variable_set_form()manages the camera config
Additionally,
arth/webui-oldandarth/collab-turntablecontain older versions of the turntable programarth/libgphoto2is the library allowing us to access digital cameras connected to the Piarth/motor-scriptscontains scripts that manage motor rotationarth/photosetsis where photos used to be placed after they were taken by the camera
Editing Files
To open a file with Emacs:- SSH into the Pi
- Go to the directory containing the file you want to edit, using
cd {filename} - Open the file with Emacs, using
emacs {filename} - You can also open and edit a new file using Emacs by doing
emacs {newfile}
- Emacs doesn't recognize your mouse, so to move around your file you'll need to use your arrow keys
- You can type like you would normally
- You can save a file using CTRL-x CTRL-s (C-x C-s)
- You can quit emacs by using CTRL-x CTRL-c (C-x C-c)
- For more information, there are many more detailed guides to using Emacs that can be found online that I recommend to you
Developed by Jonah Tash and Nader Atta-Allah for the Michelle Smith Collaboratory for Visual Culture.
Documented by Nader Atta-Allah (reachable at nattaall@terpmail.umd.edu)
Documented by Nader Atta-Allah (reachable at nattaall@terpmail.umd.edu)
