code#
The code
class holds the Vision Sensor Codes. code
objects are used directly with the vision
class. Up to five Codes can be stored at once.
A Code is created by using the following constructor:
The code(sig1, sig2, sig3, sig4, sig5)
constructor creates a code object:
Parameter |
Description |
---|---|
|
A previously created Signature. |
|
A previously created Signature. |
|
Optional. A previously created Signature. |
|
Optional. A previously created Signature. |
|
Optional. A previously created Signature. |
// Create a new Signature "darkBlue" with the signature class.
vision::signature darkBlue = vision::signature(1, -3911, -3435, -3673,10879, 11421, 11150,2.5, 0);
// Create a new Signature "pink" with the Signature class.
vision::signature pink = vision::signature(2, 8211, 8481, 8346,4953, 5271, 5112,2.5, 0);
// Create a new Code "pink_darkBlue" with the code class.
code pink_darkBlue = code(pink, darkBlue);