代码#

The Code class holds the Vision Sensor Codes. Code objects are used directly with the Vision class. Up to five Signatures can be stored at once.

使用以下构造函数创建签名:

Code(sig1, sig2, sig3, sig4, sig5)

此构造函数使用六个参数:

范围

描述

sig1

先前创建的 签名

sig2

先前创建的 签名

sig3

可选。 先前创建的 签名

sig4

可选。 先前创建的 签名

sig5

可选。 先前创建的 签名

# 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)