VEX V5 Python API
Public Member Functions | List of all members
vex.Light Class Reference

Inherits vex.TriDevice.

Public Member Functions

def __init__ (self, triport_port)
 Use this class when programming with a light sensor. More...
 
def value (self, analogUnits=AnalogUnits.PCT)
 Gets the value of the light sensor. More...
 

Constructor & Destructor Documentation

◆ __init__()

def vex.Light.__init__ (   self,
  triport_port 
)

Use this class when programming with a light sensor.

Member Function Documentation

◆ value()

def vex.Light.value (   self,
  analogUnits = AnalogUnits.PCT 
)

Gets the value of the light sensor.

Parameters
analogUnitsThe unit type of the value that is returned.
Returns
Returns an integer that represents the unit value specified by the parameter of the light sensor.