TCS3472 เซนเซอร์ตรวจจับสี Color Sensor Development Board Module V2.0
tcs3472-เซนเซอร์ตรวจจับสี-color-sensor-development-board-module-v2-0
ข้อมูลสินค้า
ราคา
190.00 บาท
แบรนด์
No Brand
ร้านค้า
  • Color Senser
TCS3472 เซนเซอร์ตรวจจับสี Color Sensor Development Board Module V2.0

เซ็นเซอร์ TCS3472 สำหรับตรวจวัดความเข้มสี แดง เขียว น้ำเงิน ให้ค่าของสีแต่ละค่าออกมา แบบ RGB มีไฟ LED สำหรับวัดในที่มืดหรือแสงไม่เพียงพอ ใช้การสื่อสารแบบ I2C ใช้ไฟเลี้ยง 3.3-5V



TCS3472 โค้ดตัวอย่าง
5V -> VIN
GND -> GND
A4 -> SDA
A5
-> SCL




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

#include <Wire.h>
#include <Adafruit_TCS34725.h>

Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_614MS, TCS34725_GAIN_1X);

void setup(void) {
Serial.begin(9600);

if (tcs.begin()) {
Serial.println("Found sensor");
} else {
Serial.println("No TCS34725 found ... check your connections");
while (1);
}
}

void loop(void) {
uint16_t r, g, b, c, colorTemp, lux;

tcs.getRawData(&r, &g, &b, &c);
colorTemp = tcs.calculateColorTemperature_dn40(r, g, b, c);
lux = tcs.calculateLux(r, g, b);

Serial.print("Color Temp: "); Serial.print(colorTemp, DEC); Serial.print(" K - ");
Serial.print("Lux: "); Serial.print(lux, DEC); Serial.println();
Serial.print("R: "); Serial.print(r, DEC); Serial.print(" ");
Serial.print("G: "); Serial.print(g, DEC); Serial.print(" ");
Serial.print("B: "); Serial.print(b, DEC); Serial.print(" ");
Serial.print("C: "); Serial.print(c, DEC); Serial.print(" ");
Serial.println("
"
)
}



คำที่เกี่ยวข้อง
เซนเซอร์ตรวจจับเซนเซอร์ตรวจจับวัตถุเซนเซอร์ตรวจจับเส้นเซนเซอร์ตรวจจับควันเซนเซอร์ตรวจจับโลหะเซนเซอร์ตรวจจับเสียงเซนเซอร์ตรวจจับฝนเซนเซอร์ตรวจจับฝุ่นเซนเซอร์ตรวจจับการเคลื่อนไหวเซนเซอร์ตรวจจับเปลวไฟ

สินค้าใกล้เคียง