This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:v2:building_the_libpixyusb_example_on_linux [2018/06/29 23:53] pixycam |
wiki:v2:building_the_libpixyusb_example_on_linux [2018/12/14 19:47] jfrench [Start the example] |
||
---|---|---|---|
Line 2: | Line 2: | ||
- | ====== Introduction ====== | + | ====== 1.0. Introduction ====== |
The libpixyusb2 library provides a software application programming interface (API) for communicating\\ | The libpixyusb2 library provides a software application programming interface (API) for communicating\\ | ||
Line 17: | Line 17: | ||
- | ====== Procedure ====== | + | ====== 2.0. Procedure ====== |
- | ===== Install dependencies for building libpixyusb2 ===== | + | ===== 2.1. Install dependencies for building libpixyusb2 ===== |
Start the terminal application: | Start the terminal application: | ||
Line 29: | Line 29: | ||
''%%sudo apt-get install git libusb-1.0-0-dev g++%%'' | ''%%sudo apt-get install git libusb-1.0-0-dev g++%%'' | ||
- | ===== Build libpixyusb2 ===== | + | ===== 2.2. Build libpixyusb2 ===== |
- | ==== Download Pixy2 source code ==== | + | ==== 2.2.1. Download Pixy2 source code ==== |
In the terminal window type: | In the terminal window type: | ||
Line 42: | Line 42: | ||
In the terminal window type: | In the terminal window type: | ||
- | ''%%./pixy2/scripts/build_libpixyusb2.sh%%'' | + | ''%%cd pixy2/scripts && ./build_libpixyusb2.sh%%'' |
{{:undefined:build_libpixyusb2.png?400|}} | {{:undefined:build_libpixyusb2.png?400|}} | ||
- | ====== Example projects ====== | + | ====== 2.3. Example projects ====== |
Before trying the examples below, connect Pixy2 to your Linux system using a USB Micro-B cable: | Before trying the examples below, connect Pixy2 to your Linux system using a USB Micro-B cable: | ||
Line 52: | Line 52: | ||
{{wiki:v2:img_5268_result.jpg?400|}} | {{wiki:v2:img_5268_result.jpg?400|}} | ||
- | ===== Color Identification Example (GetBlocksCPPDemo) ===== | + | ===== 2.3.1. Color Identification Example (GetBlocksCPPDemo) ===== |
The example does the following: | The example does the following: | ||
Line 64: | Line 64: | ||
In the terminal window type: | In the terminal window type: | ||
- | ''%%./pixy2/scripts/build_get_blocks_cpp_demo.sh%%'' | + | ''%%./build_get_blocks_cpp_demo.sh%%'' |
{{:wiki:v2:build_get_blocks.png?400|}} | {{:wiki:v2:build_get_blocks.png?400|}} | ||
Line 74: | Line 74: | ||
In the terminal window type: | In the terminal window type: | ||
- | ''%%cd ./pixy2/build/get_blocks_cpp_demo%%''\\ | + | ''%%cd ../build/get_blocks_cpp_demo/%%''\\ |
''%%sudo ./get_blocks_cpp_demo%%'' | ''%%sudo ./get_blocks_cpp_demo%%'' | ||
Line 81: | Line 81: | ||
Block data received from Pixy2 is displayed in stdout. | Block data received from Pixy2 is displayed in stdout. | ||
- | ===== Line Identification Example (GetLinesCPPDemo) ===== | + | ===== 2.3.2. Line Identification Example (GetLinesCPPDemo) ===== |
This example does the following: | This example does the following: | ||
Line 96: | Line 96: | ||
==== Start the example ==== | ==== Start the example ==== | ||
- | To start the pan_tilt demo, run 'get\_lines\_cpp\_demo' as root. | + | To start the get_lines demo, run 'get\_lines\_cpp\_demo' as root. |
''%%cd ./pixy2/build/get_lines_cpp_demo%%''\\ | ''%%cd ./pixy2/build/get_lines_cpp_demo%%''\\ | ||
Line 103: | Line 103: | ||
{{:wiki:v2:get_lines_demo.png?400|}} | {{:wiki:v2:get_lines_demo.png?400|}} | ||
- | ====== Comments ====== | + | ====== 3.0. Comments ====== |
- | We welcome your thoughts and feedback! Please let us know how we can improve. | + | We welcome your thoughts and feedback! Please let us know how we can improve... |