Pixy2 Quick Links
Basics
Connecting Pixy2 to…
Pixy2 Modes / Programs
Software and Support
Basics
Connecting Pixy2 to…
Pixy2 Modes / Programs
Software and Support
PixyMon v2 is an application that allows you to configure Pixy2 and see what it sees. It runs on several different platforms including Windows, MacOS and Linux, as well as other smaller embedded systems like Raspberry Pi and BeagleBone Black.
You can download the latest version of PixyMon v2 here.
Here's what PixyMon v2 looks like:
Clicking on the gear icon in the toolbar or selecting Configure in the File menu brings up the configure dialog.
The configure dialog changes dynamically based on which program is currently running on Pixy2, but mostly the Tuning and Expert tabs change when switching programs.
The Tuning tab contains the parameters you are most likely to want to adjust when running a particular program. For example, when running the color connected components program, the signature ranges are in the Tuning tab, because these are commonly tweaked to improve the object detection accuracy.
The Expert tab contains the parameters that are less commonly adjusted but can still be important for a particular program to function at its best. For example, when running the color connected components program, the maximum number of blocks allowed are in the Expert tab because this is commonly changed once or twice and left alone.
Refer to the particular program references for what the Tuning and Expert tabs do for each program.
This program is a hue-based object detection algorithm. More information about the CCC program can be found here.
This menu contains all of the actions available for the color connected components program, which mostly has to do with setting color signatures. To bring up this menu, you must be running the color_connected_components program by selecting it in the Program menu, and then clicking on the Action menu in the menubar.
This menu contains the different views available in PixyMon for the color connected components program. To bring up this menu, you must be running the color_connected_components program by selecting it in the Program menu, and then clicking on the View menu in the menubar.
This tab contains all of the most effective parameters for “tuning” the accuracy of color signatures. To bring up this tab, you must be running the color_connected_components program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Tuning tab under Pixy Parameters (it should be the first pane you see when you bring up the Configure Dialog.)
This tab contains more advanced parameters for adjusting various color connected components things. To bring up this tab, you must be running the color_connected_components program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Expert tab under Pixy Parameters.
The Signature Labels tab allows you to label objects that are detected by Pixy2. To bring up this tab, you must be running the color_connected_components program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Signature Labels tab under Pixy Parameters.
Note that the signature labels are stored on Pixy2. So if you set some signature labels and then plug your Pixy into another computer running PixyMon, the labels will be there.
To label a signature, simply type in the label and click on Apply or OK.
Detected objects that match this signature will then be labeled in PixyMon.
Labeling color coded objects requires typing commands into the console, since there are thousands of possible color codes. You can bring up the console by selecting Console in the View menu. Start by pressing the stop button.
Then type in the command cc_setLabel followed by the color code number (in octal) followed by the label. Note, if you want spaces in your label, use underscores instead. And don't forget to hit return!
Your label will then show up in the Signature Labels Tab as you'd expect, and any objects that match your color code will be labeled with the label you specified. (yay!)
This program performs line tracking and is intended for robots that follow lines. More information about this algorithm can be found here.
This menu contains the different views available in PixyMon for the line tracking program. To bring up this menu, you must be running the line_tracking program by selecting it in the Program menu, and then clicking on the View menu in the menubar.
This tab contains all of the most effective parameters for “tuning” the accuracy of the line tracking algorithm. To bring up this tab, you must be running the line_tracking program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Tuning tab under Pixy Parameters (it should be the first pane you see when you bring up the Configure Dialog.)
This tab contains more advanced parameters for adjusting various line tracking things. To bring up this tab, you must be running the line_tracking program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Expert tab under Pixy Parameters.
Warning! These are “expert” parameters. Some are used for testing/debugging and furthermore may cause the line tracking algorithm to act strangely for some values. No smoke will pour out of your Pixy2 (that's good) but exercising a little caution is advised!
The Barcode Labels tab allows you to label barcodes that are detected by Pixy2. To bring up this tab, you must be running the line_tracking program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Barcode Labels tab under Pixy Parameters.
Note that the barcode labels are stored on Pixy2. So if you set some barcode labels and then plug your Pixy2 into another computer running PixyMon, the labels will be there.
To label a barcode, simply type in the label and click on Apply or OK.
Detected barcodes that match this barcode will then be labeled in PixyMon.
This program demonstrates the pan-tilt unit. More information about the pan-tilt demo can be found here.
This tab contains all of the most effective parameters for “tuning” the pan-tilt demo. To bring up this tab, you must be running the pan_tilt_demo program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Tuning tab under Pixy Parameters (it should be the first pane you see when you bring up the Configure Dialog.)
It is recommended to use this demo with the pan-tilt unit. And here's how to run the pan-tilt demo.
The proportional and derivative gains can improve the motion of the pan-tilt. For example, if the tilt axis is oscillating rapidly, try decreasing the tilt axis proportional gain and increasing tilt axis derivative gain. Note, the PD gains can be set to negative values if your pan or tilt axis has an opposite sign.
This tab contains more advanced parameters for adjusting various pan-tilt demo things. To bring up this tab, you must be running the pan_tilt_demo program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Expert tab under Pixy Parameters.
Note, this tab is the same as the color connected components expert tab.
The video program displays video – simple! It can also be used to get red, green and blue pixel values of specified locations within the video images. Check out the video API for more details.
We noticed that several Pixy1 users were using Pixy to just sense color values, but using the color connected components algorithm to do so.
To make these kinds of color sensing applications easier (we're talking to you, Rubik's cube solvers!), we added the getRGB() function to the video program. We won't be giving any TED talks on this feature, but we hope it's useful. :)
Note, PixyMon displays the x, y mouse location in image coordinates in the lower right corner of the main window to help determine the coordinates to request from getRGB().
This tab contains all of the most effective parameters for “tuning” the video. To bring up this tab, you must be running the video program by clicking on the Raw video icon in the toolbar, or selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Tuning tab under Pixy Parameters (it should be the first pane you see when you bring up the Configure Dialog.)
This tab (for now) doesn't contain much. In subsequent versions it may contain more advanced parameters for adjusting various video things. To bring up this tab, you must be running the video program by clicking on the Raw video icon in the toolbar, or selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Expert tab under Pixy Parameters.
This tab contains parameters for configuring how Pixy2 acquires images for processing. These parameters are considered to be “advanced”, so you should avoid changing them unless you have a good understanding of what they do! The Camera tab is present regardless of the program that is running on Pixy2. To bring up the Camera tab, first bring up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Camera tab under Pixy Parameters.
This tab contains parameters for configuring how Pixy2 communicates its results (what it senses) to the world. Pixy2 uses one of several interfaces to do this – UART, SPI, I2C, USB and analog/digital output. The Interface tab is present regardless of the program that is being run on Pixy2. To bring up the Interface tab, first bring up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Interface tab under Pixy Parameters.
This tab contains parameters for configuring the two RC-servo ports on Pixy2. The port pinouts, as well as which port is which can be found here. The Servo tab is present regardless of the program that's running on Pixy2. To bring up the Servo tab, first bring up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Servo tab under Pixy Parameters.
Different brands of RC-servos tend to require different timings, which can lead to the servos moving more or less than desired or that they are capable of. This dialog can help address these differences.
Note: the lower limit values control how far clockwise the servos move, with more negative being farther clockwise. The upper limit values control how far counter-clockwise the servos move, with more positive being farther counter-clockwise.
You can test the limits by issuing servo move commands from the console window. You can bring up the console window by selecting Console in the View menu. Hit the stop button and type in the following commands:
This tab contains parameters for configuring various PixyMon related features. To bring up the Interface Tab, first bring up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the PixyMon Parameters.
Grabbing and saving a video frame in PixyMon is straightforward. Just select File➜Save Image. That's it – the saved image will then be saved in the documents directory. You can choose to press the stop button if you wish, or you just grab/save the image frame on-the-fly.
Pixy2 stores several parameters such as the color signatures, signature ranges, servo limits, data out port, UART baudrate, etc. in flash memory so they can be recalled and used for subsequent power cycles. You can save these parameters on your computer and reload them onto your Pixy2 later, or even copy them onto another Pixy2.
You first need to save the parameters into a local file onto your computer. Select File➜Save Pixy parameters… PixyMon will bring up a file selection dialog. Choose a suitable filename and press OK. The parameters will then be transferred from your Pixy and saved in the file you chose.
To load previously saved parameters onto your Pixy2, select File➜Load Pixy parameters… PixyMon will bring up a file selection dialog. You can then choose the file you previously saved and press OK. PixyMon will then load the parameters contained in the file onto your Pixy2.
To restore the default values for all of Pixy2's parameters, select File➜Restore default parameters. Pixy2 will then write all of the default parameters for you.
Pixy2 uses a ROM-based algorithm to upload new firmware into flash memory over USB, which makes Pixy2 “unbrickable” - that is, you will always be able to recover Pixy2 from an unsuccessful firmware upload or a “bad” version of firmware.
Start like this:
Now do these steps (please):
Holding the button down while connecting Pixy2 to USB puts Pixy2 in “firmware upload mode”. Since this is the first time you have uploaded firmware onto Pixy2, your computer will go through a driver installation process. This is because Pixy2 uses a separate device driver for firmware upload, and your computer hasn't seen this device on its USB port before (Note: this only happens if you're using a Windows computer. If you're using a Mac or Linux machine, scroll down to the “Pixymon” section and skip this driver installation business).
You should get a small message in the system tray similar to this one:
Wait for the driver to finish installing, which shouldn't require any actions on your part, just some waiting.
You should get the New Hardware Wizard
Click on “No, not this time” and then “Next”. In the next dialog, *click on “Install the software automatically” and then “Next”.
The driver will then be installed. Wait for this to finish before continuing.
No special steps need to be taken.
In the PixyMon console (at the bottom of the PixyMon window) you should see the message “Pixy programming state detected”. If you don't see this message, the drivers may still be installing. Just wait a little more.
Then a file selection dialog will appear. Browse to your new firmware file (it's a .hex file) and select it, then press OK. Pixy2 will then take the new program and write it into its flash memory. It's quick – it only takes 5 seconds or so. When it's done uploading the new firmware will start running.
You're done!
The next time you upload firmware, the drivers will be installed, so you just need to initiate firmware upload mode by holding down the button while plugging in the USB cable.