The libpixyusb2 library provides a software application programming interface (API) for communicating
with Pixy2 over USB. This allows you to write software that interfaces with Pixy2 like the PixyMon application.
The following procedure will outline the steps required for building the libpixyusb2 library and some example projects using the library. This procedure assumes the following:
The Mint-18 distribution of Linux can be downloaded here: http://www.linuxmint.com
Although this procedure uses Linux Mint-18, it should work with any Linux distribution that uses the Debian package manager (e.g. Ubuntu).
Start the terminal application:
In the terminal window type:
sudo apt-get install git libusb-1.0-0-dev g++
The example does the following:
To start the get blocks example, run 'getblockscpp_demo' as root.
In the terminal window type:
cd ./pixy2/build/get_blocks_cpp_demo
sudo ./get_blocks_cpp_demo
Block data received from Pixy2 is displayed in stdout.
This example does the following:
In the terminal window type:
./pixy2/scripts/build_get_lines_cpp_demo.sh
To start the pantilt demo, run 'getlinescppdemo' as root.
cd ./pixy2/build/get_lines_cpp_demo
sudo ./get_lines_cpp_demo
We welcome your thoughts and feedback! Please let us know how we can improve.