< Currently in Progress >
- A Raspberry Pi (Currently using Model 3)
- Raspbian OS - Buster
- Python v3
Go through steps "First-time setup and initialization" and then steps "Automatic initialization" if no prior initializations have been made. Following the first initialization, only the latter steps need to be run for initialization.
Virtual environment packages setup
- Go into the application directory through
cd /Documents/python-dolly-cam-app/
- Setup virtual env with
python3 -m venv venv
command - Install packages through
pip install -r requirements.rpi.txt
Automatic initialization (only after installing required packages in venv):
- Run initialization executable 'sudo /home/pi/Documents/python-dolly-cam-app/intialize.py'
1a. If above step fails, change initialize.py to executable with
sudo chmod u+x ~/Documents/python-dolly-cam-app/initialize.py
- Use your browser (mobile or desktop) to access your Raspberry Pi client web server through your Pi's IP address at port 5000 (or
10.10.10.10:5000
when disconnected from the internet) - To close server after use, press ^C (ctrl + C)
- Deactivate hotspot with 'sudo /home/pi/Documents/python-dolly-cam-app/hotspot.sh'
Alternatively, the following related commands are presented below as well.
# Activate hotspot and run app.py from virtual environment
sudo ~/Documents/python-dolly-cam-app/initialize.py
# If above step fails, initialize.py might not be an executable. Try following command:
sudo chmod u+x ~/Documents/python-dolly-cam-app/initialize.py
# Activate/Deactivate the hotspot
sudo ~/Documents/python-dolly-cam-app/hotspot.sh
# Create a virtual environment (Make sure you're in the application's directory)
python3 -m venv venv
- ✅ The Raspberry Pi can act as its own WiFi hotspot without active internet connection (03/04/2020)
- ✅ Anyone can issue commands to the Raspberry Pi OS through the Python/Flask Web Server at port 5000 (04/04/2020)
- Implementing a physical button that initializes server environment, i.e. turns on hotspot and runs server through venv
- Using the web server to control a servo - forward, backward, speed (RPM).
- Gearbox design and coordination thereof with servo control script. Ideally want to be able to input a given speed in m/s rather than RPM.
- First major milestone: vehicle with forward/backward movement.
- Incorporating turning input.
- ✅ Can connect a camera and control it via the Raspberry Pi + your phone (11/04/2020)
- ✅ Support for different brands of cameras by outputting a list of configurations available for that specific device (12/04/2020)
- Can toggle to video mode and photography mode
- Can see a live preview rendering on your phone
- To be determined
- To be determined
Before attempting to use your camera, check if it is listed as a supported device here
- Connect your DSLR camera to one of the USB ports
- Turn the camera on
- Enable "PTP mode" or "Connect to Computer mode" equivalent
- For optimal results, set it to "Manual" mode
- Run
. get_camera_configs.sh
. This will automatically create a list of supported configurations for your device - Access the remote control server (
10.10.10.10:5000
) and enjoy!
Set up your Raspberry Pi as an Access Point Wi-Fi Hotspot https://www.youtube.com/watch?v=qMT-0mz1lkI
Installing Python
sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev
wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
sudo tar zxf Python-3.7.1.tgz
cd Python-3.7.1
./configure
make
sudo make install
sudo pip3 install --upgrade pip
https://installvirtual.com/install-python-3-on-raspberry-pi-raspbian/
http://www.knight-of-pi.org/installing-python3-6-on-a-raspberry-pi/
Raspberry Pi Remote Controlled Car https://www.instructables.com/id/Raspberry-Pi-Remote-Controlled-Car-1/
Installing GPhoto2 Pre-requisites
wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
tar xvfz pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
./configure --prefix=/usr/local/pkg_config/0_29_2 --with-internal-glib
make
make install
https://noknow.info/it/os/install_pkg_config_from_source?lang=en