Configuring the PixyCam

This page is under construction. The purpose is to ensure the PixyCAM is correctly configured for line following mode, which is also used in NXP-CUP. Last updated 07/07/2023

Using Pixy2 with PX4

The pixy2 camera is a computer-aided visual recognition system used in NXP Cup to create a line-following robot. It can also be trained to detect colored objects.

Configuring the camera

To start working with the camera you first need to configure it. Download and install Pixymon v2 then connect your camera to your computer using USB.

The camera communication interface has to be configured first. Follow this guide for more information.

Open Pixymon v2. In the "Program" tab you can choose different modes. As default there are four different modes to choose from:

  • color connected components or CCC: a color-based filtering algorithm. you can teach the camera what you are interested in sensing (more information here)

  • line tracking: detect and track line (more information here)

  • pan tilt demo: testing the program of pan-tilt mechanism (more information here)

  • video: video display (more information here)

Example code

An example code is already integrated to PX4 code. This code used line tracking mode and publish vector data using the uORB messaging API of PX4 (more information in this link).

Another example code is available under the NXP HoverGames GitHub. This code uses CCC mode to print block data. This code is good to start learning the API :

Line tracking mode

The Pixy 2 has to be in the mode "line tracking ". The instructions can be found here.

To develop new application for line tracking, you can refer to this documentation.

Last updated