Instructions for installing R22 robot control scripts on the Base Station Pi

- Use the Raspberry Pi imager to flash an SD card with the 
  64-bit Trixie operating system.

- After configuring the system settings, open a terminal window
  and udpate the system:

sudo apt-get update
sudo apt-get -y upgrade
sudo reboot

- Install gstreamer plugins by running the the following command
  to install a missing dependency:

sudo apt-get install libx264-dev libjpeg-dev

  (*This command will inform you that 2,884 kB of additional 
  disk space will be used and will ask if you want to continue,
  answer yes, or y.)

- Run this next command to install the remaining plugins:
 (*This command will inform you that 564 MB of additional 
 disk space will be used, answer yes or y.)

sudo apt-get install libgstreamer1.0-dev \
	libgstreamer-plugins-base1.0-dev \
	libgstreamer-plugins-bad1.0-dev \
	gstreamer1.0-plugins-ugly \
	gstreamer1.0-tools \
	gstreamer1.0-gl \
	gstreamer1.0-gtk3

- Determine the IP address by running the following command:

ifconfig

  (*Make sure to set the IP address of the base station Pi and the R22 Pi
  as static IP addresses, so that they stay the same after a reboot.  This
  is done by setting a DHCP reservation in your WIFI router software.)

- Download the BaseStation.tar file

https://www.solvebotics.com/resources-manuals

- Extract the BaseStation.tar file the following command:

tar -xvf BaseStation.tar

  (*This will create a solvebotics directory under /home/<user name>/)

- Change to the solvebotics directory:

cd /solvebotics

- Edit the KEYctlgst.py script and change the IP address on line 98 to match
  the IP address of the R22 Pi.

nano KEYctlgst.py

- If the R22 Pi is current running the R22robot_fdbk.py and R22sendvidh.sh scripts, 
  then execute the base station python script with the following command:

python KEYctlgst.py

- You should now be able to view video from the R22 robot as well as control the movement 
  of the R22 robot using the arrow keys on the keyboard of the base station Pi.

Copyright (c) 2025 SolveBOTICS LLC
