robotpy_toolkit_7407.sensors.color_sensors package

Submodules

robotpy_toolkit_7407.sensors.color_sensors.REVColorSensor module

class robotpy_toolkit_7407.sensors.color_sensors.REVColorSensor.REVColorSensor(sensor_port: int, I2C_address: int = 113, threshold_blue: float = 500, threshold_red: float = 500, threshold_green: float = 400, debug: bool = False)

Bases: object

REVColor Sensor Wrapper for usage with I2C Multiplexer

color() str

Returns the color of the detected object.

Returns:

str: “red”, “blue”, or “none”.

get_val() tuple[float, float, float, int]

Return the raw values of the color sensor’s response.

Returns:

tuple[float, float, float, int]: R, G, B, Proximity.

Module contents