상품명 | [DM030] 컬러센서 TCS34725 모듈 |
---|---|
판매가 | 8,500원 |
상품요약정보 | 다두블럭 테크닉 모듈 |
배송방법 | 택배 |
배송비 | 3,000원 (70,000원 이상 구매 시 무료) |
수량 |
SNS 상품홍보 | |
---|
(최소주문수량 1개 이상 / 최대주문수량 0개 이하)
사이즈 가이드할인가가 적용된 최종 결제예정금액은 주문 시 확인할 수 있습니다.
제품사양
전압: 3~5V
TCS34725
칩을 사용한 컬러센서 모듈 입니다.
I2C
통신방식으로 제어
감지거리 3~10mm
이미지
아두이노 소스코드
//홈페이지: www.daduino.co.kr //이메일: daduino@daduino.co.kr
//아두이노의 I2C단자에 연결
#include <Wire.h> #include
"Adafruit_TCS34725.h"
/* Example code for the
Adafruit TCS34725 breakout library */
/* Connect SCL to analog 5 Connect SDA to analog 4 Connect VDD to 3.3V DC Connect GROUND to common ground */
/* Initialise with default
values (int time = 2.4ms, gain = 1x) */ // Adafruit_TCS34725 tcs =
Adafruit_TCS34725();
/* Initialise with specific
int time and gain values */ Adafruit_TCS34725 tcs =
Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_700MS, 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); }
// Now we're ready to get readings! }
void loop(void) { uint16_t r, g, b, c, colorTemp, lux;
tcs.getRawData(&r, &g, &b,
&c); // colorTemp =
tcs.calculateColorTemperature(r, g, b); 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.print(" - "); 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(" "); } |
상품의 사용후기를 적어주세요.
게시물이 없습니다
상품에 대해 궁금한 점을 해결해 드립니다.
게시물이 없습니다