This repository contains documentation, setup scripts and software examples need to integrate the V5 PiHAT with the VEX V5 robot control system.
-
Window 10
-
V5Hat
-
Rapberry Pi Zero W https://www.raspberrypi.org/products/raspberry-pi-zero-w/
-
Raspberry Pi Camera V2
-
A 5.25V 2.5A USB micro power supply
-
A USB type A to micro cable
-
At least an 8GB micro SD card
-
A micro SD card do USB adapter
-
A monitor with either an HDMI port or display port.
-
A mini HDMI to HDMI or Display Port cable.
- Download Raspian Jessie Desktop(Stretch not supported) Lite https://www.raspberrypi.org/downloads/raspbian/
- Download and install Etcher https://www.balena.io/etcher/
- Connect the uSD to the computer using the adapter or other method
- Type BalenaEtcher into the start menu and click BelenaEtcher
- Click the Select Image Button
- Navigate to and select the Raspian Stretch Light zip file
- Click Select Drive
- Navigate to and select the uSD folder
- Click the Flash! button and wait for the program to complete
-
Make sure the uSD card is connected to the computer
-
Plug the mini HDMI cable into the Raspberry Pi and connect the other end to a monitor
-
Connect the power supply to the Raspberry Pi
-
Click the
-
Save the file as wpa_supplicant.conf in the boot directory
- Insert the uSD card into the Raspberry Pi
- Plug the mini HDMI cable into the Raspberry Pi and connect the other end to a monitor
- Plug the 2.5A power supply into the Raspberry Pi
- Record the IP address of the Raspberry Pi. The IP address is shown on completion of boot
- Download and install PuTTY on your windows machine https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Type PuTTY into the Windows search bar and run the program
- In the Session category, type in the IP address in the text box labeled Host Name(or IP address)
- If this is the first time connecting, PuTTY will issue a security alert. Click Yes.
- Enter pi as the login
- Enter raspberry as the password
- Once connected, there is no need to use the monitor. Note that if you can't connect in the futer, the IP address may have changed and so you will need to plug the monitor back in in order to acquire the IP address.
-
- Connect to the Raspberry Pi using SSH
- Type the following in the PuTTY terminal pressing enter after every line and type y and enter when prompted sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev sudo apt-get install libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev wget https://www.python.org/ftp/python/3.5.7/Python-3.5.7.tar.xz sudo tar xf Python-3.5.7.tar.xz cd Python-3.5.7 sudo ./configure --prefix=/usr/local/opt/python-3.5.7 sudo make -j4 sudo make altinstall sudo ln -s /usr/local/opt/python-3.5.7/bin/pydoc3.5 /usr/bin/pydoc3.5 sudo ln -s /usr/local/opt/python-3.5.7/bin/python3.5 /usr/bin/python3.5 sudo ln -s /usr/local/opt/python-3.5.7/bin/python3.5m /usr/bin/python3.5m sudo ln -s /usr/local/opt/python-3.5.7/bin/pyvenv-3.5 /usr/bin/pyvenv-3.5 sudo ln -s /usr/local/opt/python-3.5.7/bin/pip3.5 /usr/bin/pip3.5 alias python='/usr/bin/python3.5' alias python3='/usr/bin/python3.5' ls /usr/bin/python* cd .. sudo rm -r Python-3.5.7 rm Python-3.5.7.tar.xz . ~/.bashrc python -V
- Connect to the Raspberry Pi using SSH
- Type the following in the PuTTY terminal pressing enter after every line and type y and enter when prompted sudo apt update sudo apt install python3-dev python3-pip sudo apt install libatlas-base-dev sudo pip3 install -U virtualenv pip3 --no-cache-dir install tensorflow
- Connect to the Raspberry Pi using SSH
- Type the following in the PuTTY terminal pressing enter after every line and type y and enter when prompted sudo apt-get install autoconf automake libtool curl wget https://github.com/google/protobuf/releases/download/v3.7.1/protobuf-all-3.7.1.tar.gz tar -zxvf protobuf-all-3.7.1.tar.gz cd protobuf-3.7.1 ./configure make make check sudo make install cd python export LD_LIBRARY_PATH=../src/.libs python3 setup.py build --cpp_implementation python3 setup.py test --cpp_implementation sudo python3 setup.py install --cpp_implementation export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=3 sudo ldconfig protoc sudo reboot now
sudo apt-get freetype6-dev pip3 install matplotlib
sudo apt-get install -y libusb-1.0-0-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libatlas-base-dev git automake byacc lsb-release cmake libgflags-dev libgoogle-glog-dev liblmdb-dev swig3.0 graphviz libxslt-dev libxml2-dev gfortran python3-dev python-pip python3-pip python3-setuptools python3-markdown python3-pillow python3-yaml python3-pygraphviz python3-h5py python3-nose python3-lxml python3-matplotlib python3-numpy python3-protobuf python3-dateutil python3-skimage python3-scipy python3-six python3-networkx python3-tk mkdir -p ~/workspace cd ~/workspace git clone -b ncsdk2 http://github.com/Movidius/ncsdk && cd ncsdk && make install
sudo apt-get update && sudo apt-get upgrade sudo apt-get install libopencv-dev
sudo apt-get install cmake cd ~ wget https://sourceforge.net/projects/raspicam/files/raspicam-0.1.6.zip/download mv download raspicam unzip raspicam rm raspicam cd raspicam-0.1.6 mkdir build cd build cmake .. make sudo make install sudo ldconfig
sudo reboot now sudo modprobe bcm2835-v4l2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib