<< return to Pixycam.com

Pixy2 sending undefined message

I am trying to communicate Pixy with a Nucleo-F446RE microcontroller using the UART protocol. So far I have succeeded in realizing the message reading associated with Color Conected Components i.e. I am getting the correct data and I have realized the following algorithm. In general, everything works as expected unfortunately every now and then the algorithm stops working, this usually happens when the object often disappears and appears in the field of view of the camera. Wanting to locate the problem I print to the console the contents of the buffer into which the message goes and when the algorithm stops working I get a repeating sequence of messages (for example) afc121000000afc10301fc00fcafc10301fc00fcafc10301fc00fcafc10301fc00fcafc10301fc00fcafc10301fc00fc00fcafc10301fc00fc00fc00fc
I also noticed that when Pixy can’t see an object it sends the message “afc121000000” (which is more like a valid message) alternating with the message “afc10301fc00fc”, where I can’t find the reason for the “afc10301fc00fc” message to appear. If needed I can show the code and printouts from the console where this situation occurs. Has anyone had the same problem and found a solution to eliminate the problem with this message appearing?

The “afc10301fc00fc" packet is an error packet of some sort. I’m guessing it doesn’t like the request you sent.