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.

The Code constructor creates a Code object.

This constructor uses five parameters:

Parameter

Description

sig1

A previously created Signature.

sig2

A previously created Signature.

sig3

Optional. A previously created Signature.

sig4

Optional. A previously created Signature.

sig5

Optional. A previously created Signature.

# Create a new Signature "dark_blue" with the Signature class.
dark_blue = Signature(1, -3911, -3435, -3673,10879, 11421, 11150,2.5, 0)
# Create a new Signature "pink" with the Signature class.
pink = Signature(2, 8211, 8481, 8346,4953, 5271, 5112,2.5, 0)
# Create a new Code "pink_darkblue with the Code class.
pink_darkblue = Code(pink, dark_blue)