<< return to Pixycam.com

Comms issues: Unable to query color connected components

Hello!

I am unable to receive my block locations from the pixy via SPI. I know my comms are functioning correctly, the pixy just seems to fault when I ask for any data. USB connection works fine.

Bytes sent: ae c1 0e 00 # init
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: af
Bytes read: c1
Bytes read: 0f 10 16 03
Bytes read: 00 23 03 00 12 00 67 65 6e 65 72 61 6c 00 00 00
Pixy firmware version: 3.0.18 # parse and print firmware version
Bytes sent: ae c1 0c 01 00 # get resolution
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: af
Bytes read: c1
Bytes read: 0d 04 0d 01
Bytes read: 3c 01 d0 00
Bytes sent: ae c1 20 02 01 01 # ask for blocks
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00

I’m running pixymonv2 while connected and it is actively getting the single block on screen. My code definitely used to pull blocks, but I have mucked and refactored it a bit. Any clues to point me in the right direction would be appreciated.

Note the same thing happens when I try to send a servo message, but I’ve disabled that portion of my code to try and reduce the problem space.

another run – seems to not be connected to the get blocks call – it stops responding after a second call to setting the neopixel.

Bytes sent: ae c1 0e 00 # init
Bytes read: 18
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: af
Bytes read: c1
Bytes read: 0f 10 16 03
Bytes read: 00 23 03 00 12 00 67 65 6e 65 72 61 6c 00 00 00
Bytes sent: ae c1 0c 01 00 # get resolution (called from init)
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: af
Bytes read: c1
Bytes read: 0d 04 0d 01
Bytes read: 3c 01 d0 00
Bytes sent: ae c1 0e 00 # get version
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: af
Bytes read: c1
Bytes read: 0f 10 16 03
Bytes read: 00 23 03 00 12 00 67 65 6e 65 72 61 6c 00 00 00
Pixy firmware version: 3.0.18
Bytes sent: ae c1 14 03 ff 00 00 # set LED red
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: af
Bytes read: af
Bytes read: c1
Bytes read: 01 04 00 00
Bytes read: 00 00 00 00
Bytes sent: ae c1 0c 01 00 # get resolution
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: 01
Bytes read: af
Bytes read: af
Bytes read: c1
Bytes read: 0d 04 0d 01
Bytes read: 3c 01 d0 00
Bytes sent: ae c1 14 03 00 ff 00 # set LED green
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00
Bytes read: 00

I’ll also note that the LED set green command does take, the neopixel turns green. so it receives the command just fine but then fails to ACK

I have discovered a (rather annoying) workaround – I have to reinitialize the SPI bus after the second LED call. after that it seems to behave just fine. I’m unsure of what in these commands is causing the bus to lock up. getblocks works being called on a 5 ms loop after this.

Hello,
I’m not sure what you’re printing. Have you tried to download the Pixy Arduino library without any changes and modifications and see if it works. You might also try to restore default paramters:
https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:pixymon_index#restoring-default-parameters

For example, the interface configuration may be configured incorrectly.

Edward