<< return to Pixycam.com

All Data from PIXY2 SPI?

Hi,

I am using PICAXE BASIC. I can get data from an older PIXY camera, but using the same software to read data from the new PIXY2 I don’t see any data ???

I need to know what is all the data I can get from the PIXY2 via the SPI and what each byte/word means.

Hi Walt,
We did change the protocol for Pixy2 because the older protocol made it difficult to support multiple sensor modes. Please check out this page for information on the new protocol:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide

Edward

I’ve been trying to send a request to the PIXY2 via SPI and I2C but so far I’m not getting an answer. I really wish the camera just constantly sent x,y data … simply receiving data seems so much easier.

Hello Walt,
Sorry for the problems. If you haven’t done so already, start by sending the sequence:

0xae
0xc1
0x0e
0x00

If you’re not getting a response to this sequence, you might take a look with an oscilloscope to make sure the bits are being sent to Pixy2.

Edward

Hi, I have been trying to port Pixy2 to an Microchip/Atmel SAMD21 using a SPI connection.
As in the earlier response, I have been sending bytes 0xAE, 0xC1,0x0E, 0x00. I have tried all four SPI modes (0 - 3) and I am sending at 20mbit. I have tried delays between sending and response of microsecs to millisecs.
I can see the bytes going out on the logic analyser and bytes being returned, but the response does not seem to make any sense just 0xFE, 0xFF and 0xFDs.
I am assuming that the Pixy can work at 3.3v as the Microchip one does.
I see the Arduino software has an init function, but all it appears to do is prepare the Arduino for the speed, MSB and mode which I have already done on the SAMD21. There does not seem to be any function which prepares the Pixy for data other than the bytes as shown above.
I would appreciate any help you can give.

Regards Mike

Hey Mike,

hmm. I’m no expert (@edge might know better than I) but just reading your post, one thing to check is your data rate - by default, Pixy2 uses 2mbit for SPI. I’m not sure if that would cause the issue you’re seeing. More info on the implementation here: https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide#spi

You might also have a look at the packet reference, if you haven’t already. https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide#pixy2-serial-protocol-packet-reference

Hope this helps!

Cheers,
Jesse

Hello,
Make sure you are in “SPI with SS” mode instead of “Arduino ICSP SPI”

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:pixymon_index#interface-tab

Pixy2 runs off of 5V – but I think you are asking about 3.3V signaling for the SPI. (Yes, 3.3V and 5V signalling both work for SPI.)

Edward