<< return to Pixycam.com

Arduino Nano clone with Pixy2 needs v1 compatibility enabled

Hello,

I recently purchased a Pixy2 and connected it to an Arduino Nano clone. I ran the software and updated the firmware but could not get the hello world to work with the signature I set up. Looking through the setup I notice a check box for v1 compatibility. After checking that box, the script started to work. Any ideas what’s wrong? Thanks.

Regards,
Greg

Sorry, I meant to mention it hangs on getBlock().

Hello Greg,
Pixy2 uses a new serial protocol and a new Arduino library. The newest Arduino library for Pixy2 can be found here:

https://pixycam.com/downloads-pixy2/

There is a compatibility mode for the older protocol and library, which you found.

The new protocol has several improvements over the old protocol. In particular, it allows Pixy to return lots of different data types – such as the line tracking data.

Converting to the new library is straightforward – it only requires changing the include to “pixy2.h” and referring to the ccc object within the Pixy2 object:

Pixy2 pixy;
pixy.ccc.getBlocks();

Instead of

Pixy pixy;
pixy.getBlocks();

Refer to the ccc_hello_world example.

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:hooking_up_pixy_to_a_microcontroller_-28like_an_arduino-29

Edward

Edward,

Thanks very much for clearing this up for me.

Mea culpa for using the wrong library.

The hello world works as expected after adding the correct library. This is an amazing product. Great stuff!

Regards,
Greg

Hi Greg, no problem! Glad you got things running. If you get a sec, please post a quick review. :slight_smile:

Edward