# Color Sensor (am-5636)

![](https://content.gitbook.com/content/cQgnvayQud3Xf5sZi0wz/blobs/Vf8eoxE16hlHSOQHc8SC/image)

### Overview

The AndyMark **Color & Proximity Sensor** is a compact, 3.3 V I2C 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 Blocks/Java samples live on **Examples**.

***

### When to use this sensor

* 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

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

* Single sensor combining **color**, **proximity**, and **ambient light** functions.
* **Standard I2C** interface (7-bit address; see **Specifications** for the exact value and bus speed).
* 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

* 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

* **Distance matters:** closer targets give stronger, more consistent color 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.
