VEX IQ Python API
|
Public Member Functions | |
def | __init__ (self, index, is_grayscale=False, proximity=700) |
def | colorname3 (self) |
Gets the name of the detected color. More... | |
def | colorname12 (self) |
Gets the name of the detected color. More... | |
def | grayscale (self, raw=False) |
Gets the grayscale value detected by the color sensor. More... | |
def | near (self) |
Check to see if an object is detected by the color sensor. More... | |
def | set_proximity_threshold (self, proximity) |
Set the near threshold setting. More... | |
def | led (self, state) |
Turns the led on the color sensor on or off. More... | |
@brief Creates a new color sensor object on the port specified in the parameter. @param index The port index (zero-based) @param is_grayscale Whether grayscale mode (LED on), default false @param proximity threshold (default 700)
def vex.Colorsensor.__init__ | ( | self, | |
index, | |||
is_grayscale = False , |
|||
proximity = 700 |
|||
) |
def vex.Colorsensor.colorname3 | ( | self | ) |
Gets the name of the detected color.
def vex.Colorsensor.colorname12 | ( | self | ) |
Gets the name of the detected color.
def vex.Colorsensor.grayscale | ( | self, | |
raw = False |
|||
) |
Gets the grayscale value detected by the color sensor.
raw | if True, raw value will be returned, otherwise a percentage |
def vex.Colorsensor.near | ( | self | ) |
Check to see if an object is detected by the color sensor.
def vex.Colorsensor.set_proximity_threshold | ( | self, | |
proximity | |||
) |
Set the near threshold setting.
proximity | threshold (higher is closer) (default 700) |
def vex.Colorsensor.led | ( | self, | |
state | |||
) |
Turns the led on the color sensor on or off.
state | if True, LED will be turned on |