# 颜色传感器模块

## 概述

颜色传感器通过光学感应来识别物体的表面颜色。支持红、绿、蓝(RGB)三基色，支持明光感应，可以输出对应的具体数值，帮助您还原颜色本真。

## 参数

* 尺寸：48x24mm
* 工作电压：3.3-5V
* 接口类型：XH2.54mm-4P
* 引脚定义：1-地 2-电源 3-SCL 4-SDA

## 接口说明

* 可用端口：四排排针

## 使用方式

![](/files/-LWVPVmZigrI0c6k5i2B)

## 示例代码

![](/files/-LWVPVmaQwJqqL_eARCH)

## 原理图

{% file src="/files/-LrD5nYnqCLgNcmACGdu" %}
颜色传感器模块原理图
{% endfile %}

## 尺寸说明

![](/files/-LWVPVY3e-Jx5ZBpQh7a)

## 常见问题


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.haohaodada.cn/jiao-xue-chan-pin/arduino-kai-yuan-ying-jian/yan-se-chuan-gan-qi-mo-kuai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
