- connector pins 2 and 4 for 5v power for relays.
- connector pin 6 for ground
- connector pin 22 (wiring pi pin 6) turntable
- connector pin 24 (wirint pi pin 10) for camera 1 (top)
- connector pin 26 (wirint pi pin 11) for camera 2 (top-middle)
- connector pin 28 (wirint pi pin 31) for camera 3 (bottom-middle)
- connector pin 32 (wirint pi pin 26) for camera 4 (bottom)
- 4 port USB hub with cameras connected should be plugged into the bottom right of the 4 usb ports on the device
- Bluetooth Keyboard paired
- USB mouse (unless BT keyboard is Mouse/Keyboard combo)
- pip install virtual env
- python3 -m venv ~/Venvs/qc
- sudo apt-get install python3-pyqt5
- Otherwise you'll have to build it and sip which will be a pain on a Pi
- First activate the Venv
$ source ~/Venvs/qc/bin/activate
- pip install wiringpi
- pip install pycryptodome
- cp -r /usr/lib/python3/dist-packages/PyQt5 Venvs/qc/lib/python3.5/site-packages/PyQt5
- cp /usr/lib/python3/dist-packages/sip.cpython-*.so ~/Venvs/qc/lib/python3.5/site-packages
is not great for this with python but I found the source code here and there is a way to play with it and see what calls you need to make
- Install gphoto2
That will give you command line interface.
$ sudo apt-get install gphoto2
- Then we want it for python too. Get the dev package so we can build it ourselves
sudo apt-get install libgphoto2-dev
- install the python wrapper - This takes a while (do it in the venv)
pip install -v gphoto2
- if we want to access images we need pillow installed
pip install pillow
- There is an annoyance with the gvfs Gnome file system that will auto mount the camera when connected.
This is a prblem because then gphoto2, in some firmware versions, will not be able to claim the device
- To prevent this you must update the file system explorer
Add the following to
~/.config/pcmanfm/LXDE-pi/pcmanfm.conf
[volume] mount_on_startup=0 mount_removable=0
- To prevent this you must update the file system explorer
Add the following to
- pip install qdarkstyle
-
Running the program
- First enable the virtual environment.
$ source ~/Venvs/qc/bin/activate
- Run the program from within the directory
$ python3 wayscan.py
- install QtCreator
- use obexpushd, need to update /etc/systemd/system/dbus-org.bluez.service
- sudo apt-get install at-spi2-core