# CAN Color Sensor (am-5683)

### Overview <a href="#overview" id="overview"></a>

The AndyMark **Color & Proximity Sensor** is a compact, 3.3V CAN device that reports **classified color**, **raw RGB + clear**, **proximity**, and **ambient light**. It’s designed for easy integration on robots and test rigs where you need reliable color detection (game pieces, markings, LEDs) and short-range presence sensing.Use this page to understand what the sensor is good for and how to get started. Detailed electrical limits, pinout, and mechanical drawings live on **Specifications**. Programming walk-throughs and Java/C++ samples live on **Examples**.

***

#### When to use this sensor <a href="#when-to-use-this-sensor" id="when-to-use-this-sensor"></a>

* Detecting the **color** of nearby objects (game elements, indicators, tape).
* **Presence / approach** detection at short range (e.g., “object is in the mechanism”).
* Measuring **ambient light** to auto-adjust thresholds or avoid false positives.
* Classifying states (e.g., “red vs blue” or “object present vs absent”) without external optics.

***

#### What this sensor is not <a href="#what-this-sensor-is-not" id="what-this-sensor-is-not"></a>

* It’s not a long-range distance sensor; for that, use the AndyMark Distance Sensor.
* It’s not a line-scan or camera; it gives summarized color/light values rather than images.

***

#### Highlights (at a glance) <a href="#highlights-at-a-glance" id="highlights-at-a-glance"></a>

* Single sensor combining **color**, **proximity**, and **ambient light** functions.
* **Standard FRC CAN** interface.
* Works with common 3.3 V robot controllers and microcontrollers.
* **Keyed 4-pin** header for simple wiring (see **Specifications → Wiring** for pin order).
* Example code provided for fast bring-up (see **Examples**).

***

#### Typical integrations <a href="#typical-integrations" id="typical-integrations"></a>

* Place near an intake to confirm **piece acquisition** and read **team color**.
* Mount along a chute or feeder to detect **jam/flow** with proximity.
* Face the field to classify **marker colors** or read **LED indicators** on mechanisms.
* Use ambient light readings to **auto-calibrate thresholds** between practice and event lighting.

***

#### Best-practice tips <a href="#best-practice-tips" id="best-practice-tips"></a>

* **Distance matters:** closer targets give stronger, more consistent color readings.
* **Turn on the LED:** Check examples for how to control the LED to turn it on for better readings
* **Control the view:** avoid direct glare from bright LEDs; a short shroud can improve classification.
* **Re-calibrate at events:** different field lighting can shift raw values—run a quick check in the pit.
* **Debounce proximity:** treat proximity as “object likely present” and confirm with a short moving average.
