The PixyMon software is used to teach the Pixy2 to recognize up to seven color signatures. PixyMon also provides a view from the Pixy2’s camera. Settings for communication baud rate, color correction and other modes of operation need to be configured. The Pixy2 can also be taught color signatures without PixyMon using the white button, but we’ve found this method to be difficult to verify and less reliable in general.
Visit the Pixy2 Downloads [1] and install PixyMon for your operating system. You can also find FAQs, troubleshooting guides, and much more are available on the Pixy2 Wiki.
The following steps are also shown in this video.
You’ll see your colored objects through the PixyMon viewer:
Restore default parameters (under File menu). As you become familiar with PixyMon software you will find yourself tuning colors for your environment’s lighting and background, sometimes moving your robot from place to place - especially to demonstrate to others. It can be fastest to restore the default parameters and reteach the color signatures in your new environment. When do this, you’ll also have to configure the Data out port and UART baudrate settings again, as shown above. These settings are necessary for our example code.
PixyMon should now show the color signature number of each unique block color with an outline and a label:
Getting the perfect color signature matches isn’t easy but you can modify the environment to improve your ability to get quality color signature matches. Try these things:
The Toggle lamp feature is perhaps the single most important option for setting color signatures. If you set your color signatures with the LED lamp ON, then you will also need to turn it ON in the BlocklyProp example Pixy2TerminalDisplay.svg code. The default code example has the LED in the OFF state.
Through experimentation we’ve found the LED lamp should be set ON when there’s no natural light or the room is dark. The LED lamp can usually be OFF when natural lighting exists. Experiment!
Additional controls including white balance and color ranges are also accessible through PixyMon’s configure menu, documented on the Teach Pixy an Object wiki [2]. We’ve found that while the many configurations allow for more precise results they are also not necessary for basic success and functionality. Also see the Tips on Improving Detection Accuracy wiki [3].
Links
[1] https://pixycam.com/downloads-pixy2/
[2] https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:teach_pixy_an_object_2
[3] https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:some_tips_on_generating_color_signatures_2