<< return to Pixycam.com

What serial data to send request?

Using a PICAXE 28X2 chip I need to know what serial data I need to send to the PIXY2 so that the PIXY2 sends back;

x,y position of color and color ID

x,y position of a line and line color ID

barcode ID

Hex, or decimal doesn’t matter, I just need to know what the commands are to send to the PIXY2 to perform simple tasks and respond with data relative to those tasks.

Hello,
Please check out this page:
https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide#line-tracking-packet-reference

You can also look at the source code here for implementation and additional reference:

Edward

Hi,

Out of all that c code I don’t see how I can create a serial out from my PIC chip to request specific color ID and x,y position?

I don’t see how I can create a serial out from my PIC chip to request x,y line position?

What are the HEX or Decimal commands to request all the various useable functions of the PIXY2 camera?

I’ve been looking at that page and other wiki/doc pages, but I don’t see a simple list of commands (HEX/Dec) v. responses (HEX/Dec)

It’s mostly here. It lays out the bytes in each packet explicitly.

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:porting_guide#line-tracking-packet-reference

Hope this helps

Edward

Hi,

How much time do I have to wait for the response after sending the “serout C.1,B9600_8,(174,193)” command before looking for a response?

Hello,
If you just sent 174 and 193, you would not get a response because it wouldn’t be a complete packet.-- those are just the sync bytes.

If you send a packet, the response will come in less than 20ms.

Edward