<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:line-packets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:v2:line-packets [2018/10/10 19:06]
pixycam
wiki:v2:line-packets [2018/10/10 19:39] (current)
pixycam [reverseVector(angle)]
Line 12: Line 12:
 |4 |Request type | 0=main features, 1=all features | |4 |Request type | 0=main features, 1=all features |
 |5 |Features (bitmap) | 7=vectors, intersections,​ barcodes | |5 |Features (bitmap) | 7=vectors, intersections,​ barcodes |
 +
 +
  
 === Response: === === Response: ===
Line 31: Line 33:
 |               | Next feature-data (optinal) | (varies) | |               | Next feature-data (optinal) | (varies) |
  
-Note, this response can have up to three different feature sections, one for vectors (if vector(s) exist), one for intersections (if intersection(s) exist) and one for barcodes (if barcode(s) exist) in the image. ​ Each feature section begins with a feature-type. ​ The feature-length is next, which indicates how many bytes are in the feature-data. ​ The feature-data is last, which has the data associated with the feature. ​ Sometimes the feature-data section will have more than of the given feature type, for example, ​if there is more than one barcode.  ​+Note, this response can have up to three different feature sections, one for vectors (if vector(s) exist), one for intersections (if intersection(s) exist) and one for barcodes (if barcode(s) exist) in the image. ​ Each feature section begins with a feature-type. ​ The feature-length is next, which indicates how many bytes are in the feature-data. ​ The feature-data is last, which has the data associated with the feature. ​ Sometimes the feature-data section will have more than one of the given feature type, for example, there may be three barcodes, in which case the three barcodes will be concatenated in the feature-data without any bytes between them.  ​ 
 + 
 + 
 +For the specific feature data types and composition,​ please consult the [[https://​github.com/​charmedlabs/​pixy2/​blob/​master/​src/​host/​arduino/​libraries/​Pixy2/​Pixy2Line.h|Pixy2Line.h]] file.  
 + 
 + 
 +==== setMode(mode) ==== 
 + 
 +=== Request: === 
 +^Bit ^Description ^Value(s) ^ 
 +|0 - 1 |16-bit sync | 174, 193 (0xc1ae) | 
 +|2 |Type of packet |54 | 
 +|3 |Length of payload |1 | 
 +|4 |Mode | (varies) |  
 + 
 + 
 +=== Response: === 
 + 
 + 
 +^Byte ^Description ^Value(s) ^ 
 +|0 - 1 | 16-bit sync | 175, 193 (0xc1af) | 
 +|2 |Type of packet |1 | 
 +|3 |Length of payload |4 | 
 +|4 - 5 |16-bit checksum | sum of payload bytes | 
 +|6 - 9              | Response/​acknowledge | (varies) | 
 + 
 + 
 +==== setNextTurn(angle) ==== 
 + 
 +=== Request: === 
 +^Bit ^Description ^Value(s) ^ 
 +|0 - 1 |16-bit sync | 174, 193 (0xc1ae) | 
 +|2 |Type of packet |58 | 
 +|3 |Length of payload |2 | 
 +|4 - 5 |16-bit angle | (varies) |  
 + 
 + 
 +=== Response: === 
 + 
 + 
 +^Byte ^Description ^Value(s) ^ 
 +|0 - 1 | 16-bit sync | 175, 193 (0xc1af) | 
 +|2 |Type of packet |1 | 
 +|3 |Length of payload |4 | 
 +|4 - 5 |16-bit checksum | sum of payload bytes | 
 +|6 - 9              | Response/​acknowledge | (varies) | 
 + 
 + 
 + 
 +==== setDefaultTurn(angle) ==== 
 + 
 +=== Request: === 
 +^Bit ^Description ^Value(s) ^ 
 +|0 - 1 |16-bit sync | 174, 193 (0xc1ae) | 
 +|2 |Type of packet |60 | 
 +|3 |Length of payload |2 | 
 +|4 - 5 |16-bit angle | (varies) |  
 + 
 + 
 +=== Response: === 
 + 
 + 
 +^Byte ^Description ^Value(s) ^ 
 +|0 - 1 | 16-bit sync | 175, 193 (0xc1af) | 
 +|2 |Type of packet |1 | 
 +|3 |Length of payload |4 | 
 +|4 - 5 |16-bit checksum | sum of payload bytes | 
 +|6 - 9              | Response/​acknowledge | (varies) | 
 + 
 + 
 + 
 +==== setVector(angle) ==== 
 + 
 +=== Request: === 
 +^Bit ^Description ^Value(s) ^ 
 +|0 - 1 |16-bit sync | 174, 193 (0xc1ae) | 
 +|2 |Type of packet |56 | 
 +|3 |Length of payload |1 | 
 +|4 |vector index | (varies) |  
 + 
 + 
 +=== Response: === 
 + 
 + 
 +^Byte ^Description ^Value(s) ^ 
 +|0 - 1 | 16-bit sync | 175, 193 (0xc1af) | 
 +|2 |Type of packet |1 | 
 +|3 |Length of payload |4 | 
 +|4 - 5 |16-bit checksum | sum of payload bytes | 
 +|6 - 9              | Response/​acknowledge | (varies) | 
 + 
 + 
 + 
 +==== reverseVector(angle) ==== 
 + 
 +=== Request: === 
 +^Bit ^Description ^Value(s) ^ 
 +|0 - 1 |16-bit sync | 174, 193 (0xc1ae) | 
 +|2 |Type of packet |62 | 
 +|3 |Length of payload |0 | 
 + 
 + 
 +=== Response: === 
 + 
 + 
 +^Byte ^Description ^Value(s) ^ 
 +|0 - 1 | 16-bit sync | 175, 193 (0xc1af) | 
 +|2 |Type of packet |1 | 
 +|3 |Length of payload |4 | 
 +|4 - 5 |16-bit checksum | sum of payload bytes | 
 +|6 - 9              | Response/​acknowledge | (varies) |
  
  
-For the specific feature data please consult the [[https://​github.com/​charmedlabs/​pixy2/​blob/​master/​src/​host/​arduino/​libraries/​Pixy2/​Pixy2Line.h|Pixy2Line.h]] file.  ​ 
wiki/v2/line-packets.1539198407.txt.gz · Last modified: 2018/10/10 19:06 by pixycam