Skip to content
mightysorensen edited this page Nov 13, 2019 · 10 revisions

Welcome to the Pixy2LabVIEW wiki!

Pixy2LabVIEW now supports FIRST Robotics Competition LabVIEW teams!

Getting Started with FRC Version

Prerequisites

You'll need to install 2019 FRC Software from National Instruments: http://www.ni.com/download/labview-for-frc-18.0/7841/en/

And the FRC 2019 Update Suite: http://www.ni.com/download/first-robotics-software-2017/7904/en/

A great installation guide can be found here: https://wpilib.screenstepslive.com/s/currentCS/m/labview/l/1027501-installing-labview-for-frc-2019-labview-only

You'll also need to install VI Package Manager: https://vipm.jki.net/

Installation

Download the FRC installer located here: https://github.com/charmedlabs/Pixy2LabVIEW/tree/master/installer

Double-clicking it will open VI Package Manager. Click 'Install':

Once installation is successful, you'll see:

Click Finish to complete the installation.

Connecting Pixy2 to roboRIO

First, configure Pixy2 to use the SPI interface. Using PixyMon2, configure Pixy2 for SPI Slave Select communication:

Connect Pixy and roboRIO using the supplied cable:

Notice that you need to connect the cable as shown with the "Pixy2 End" connected to Pixy2 and the other connected to roboRIO.

Connecting to Pixy2 can be accomplished in several other ways. See: https://github.com/charmedlabs/Pixy2LabVIEW/wiki/Other-Ways-to-Connect-Pixy2

Quick Start Project

We've provided a quickstart project to get you up and running. Find it here: https://github.com/charmedlabs/Pixy2LabVIEW/blob/master/test/FRC/FRC%20Quickstart.lvproj

Open LabVIEW FRC and then open a project by selecting Browse... Browse to the Quickstart project and open it.

Note: You will need to configure your project to connect to your roboRIO! Right Click on the project and select Add Targets and Devices...

Then select your roboRIO device.

You can now move the two example FRC VIs to your roboRIO device and delete the old device.

Next, select your roboRIO, right-click, then click connect.

You can now download and run each VI by double-clicking the VI you want to run then clicking the run button. This will download and run the VI on roboRIO and display the output on the PC.

Two examples are provided. The first is color connected components. It will display boxes in real time that represent color targets that Pixy is trained to. Remember that you need to train Pixy2 the color you want to track in CCC mode. (See: https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:teach_pixy_an_object_2)

The second demonstrates line following mode by displaying lines in real time.

Next Steps

Play with the examples! You can extend the examples to do any number of things.

  • Try turning on the Pixy2 lamp when an object is detected.
  • Change the color of the Pixy2 LED when a line moves from one side to the other.
  • Attach a pan/tilt mechanism (like: https://pixycam.com/pixy2-pan-tilt-kit/) and follow the largest detected object.

Explore the palettes: https://github.com/charmedlabs/Pixy2LabVIEW/wiki/Palettes

Build a simple robot to follow lines, chase a tennis ball, ...

Questions? Comments? Need help? Contact us on our forums! https://forum.pixycam.com/