รหัสสินค้า | A00188 |
หมวดหมู่ | LED/LCD/TFT Display |
ราคา | 200.00 บาท |
บาร์โค้ด | 885001882 |
สถานะสินค้า | พร้อมส่ง |
ลงสินค้า | 21 พ.ค. 2560 |
อัพเดทล่าสุด | 21 พ.ค. 2560 |
คงเหลือ | ไม่จำกัด |
จำนวน | ชิ้น |
โมดูล วัดค่าสี อ่านค่าสี RGB Colour Sensor (TCS230/TCS3200) สำหรับ Arduino
โมดูลวัดค่าสี RGB Colour Sensor (TCS230/TCS3200) เซนเซอร์แยกสี ใช้แยกว่าสีที่อยู่หน้าเซนเซอร์นี้เป็นสีอะไร เอาต์พุตที่อ่านได้ ออกมาเป็นค่า R G B ใช้งานง่าย มีไฟ Flash สำหรับตรวจจับสีวัตถุในที่มืด สามารถสั่งควบคุมเปิดปิดไฟได้จากในโคดโปรแกรม พื้นหลังเป็นสีขาวมีกระบอกพลาสติกสีดำ กันไม่ให้สีอื่นไปรบกวน ไม่ต้องหาต่อที่กั้นแสงเพิ่ม
รายละเอียด Color Recognition Sensor Detector (TCS230/TCS3200)
- Using imported chip TCS3200
- The TCS3200 is TCS230 upgraded version better
- Power supply 3-5v
- Resistance to light interference
- White LED can be controlled on, off.
- Can detect non-luminous object color
- Best detection distance 1cm
________________________________________________________________________________________________
library /code
____________________________________________________________________________
Vcc -> 5v
Gnd -> Gnd
s0 -> 5v
s1 -> 5v
s2 -> 12
s3 -> 13
OUT -> 5
LED -> 7
____________________________________________________________________________
ตัวอย่างCode
// TCS230 sensor calibration and color readings // // Input and output using the Serial console. //
#include
#include
#define BLACK_CAL 0 #define WHITE_CAL 1 #define READ_VAL 2 // Pin definitions #define S2_OUT 12 #define S3_OUT 13 #define OE_OUT 8 // LOW = ENABLED int led = 7; MD_TCS230 CS(S2_OUT, S3_OUT, OE_OUT); void setup() { pinMode(led, OUTPUT); digitalWrite(led, 0); Serial.begin(57600); Serial.print(F("\n[TCS230 Calibrator Example]")); CS.begin(); } char getChar() // blocking wait for an input character from the input stream { while (Serial.available() == 0) ; return(toupper(Serial.read())); } void clearInput() // clear all characters from the serial input { while (Serial.read() != -1) ; } uint8_t fsmReadValue(uint8_t state, uint8_t valType, uint8_t maxReads) // Finite State Machine for reading a value from the sensor // Current FSM state is passed in and returned // Type of value being read is passed in { static uint8_t selChannel; static uint8_t readCount; static sensorData sd; switch(state) { case 0: // Prompt for the user to start digitalWrite(led,0); Serial.print(F("\n\nReading value for ")); switch(valType) { case BLACK_CAL: Serial.print(F("BLACK calibration")); break; case WHITE_CAL: Serial.print(F("WHITE calibration")); break; case READ_VAL: Serial.print(F("DATA")); break; default: Serial.print(F("??")); break; } Serial.print(F("\nPress any key to start ...")); state++; break; case 1: // Wait for user input getChar(); clearInput(); state++; break; case 2: // start the reading process digitalWrite(led,1); CS.read(); state++; break; case 3: // wait for a read to complete if (CS.available()) { sensorData sd; colorData rgb; switch(valType) { case BLACK_CAL: CS.getRaw(&sd); CS.setDarkCal(&sd); break; case WHITE_CAL: CS.getRaw(&sd); CS.setWhiteCal(&sd); break; case READ_VAL: CS.getRGB(&rgb); Serial.print(F("\nRGB is [")); Serial.print(rgb.value[TCS230_RGB_R]); Serial.print(F(",")); Serial.print(rgb.value[TCS230_RGB_G]); Serial.print(F(",")); Serial.print(rgb.value[TCS230_RGB_B]); Serial.print(F("]")); break; } state++; digitalWrite(led,0); } break; default: // reset fsm state = 0; break; } return(state); } void loop() { static uint8_t runState = 0; static uint8_t readState = 0; switch(runState) { case 0: // calibrate black readState = fsmReadValue(readState, BLACK_CAL, 2); if (readState == 0) runState++; break; case 1: // calibrate white readState = fsmReadValue(readState, WHITE_CAL, 2); if (readState == 0) runState++; break; case 2: // read color readState = fsmReadValue(readState, READ_VAL, 1); break; default: runState = 0; // start again if we get here as something is wrong } }
หลังจากสั่งซื้อแล้ว กรุณาชำระเงิน และจะต้องแจ้งชำระเงินทางหน้าเวปเท่านั้น (การแจ้งทาง SMS หรือ email ไม่ถือว่าเป็นการแจ้งชำระเงิน) ถ้าไม่มีการแจ้งชำระเงินภายใน 48 ชม. ระบบจะยกเลิกคำสั่งซื้อโดยอัตโนมัติ ถ้าท่านต้องการสั่งซื้อสินค้าอยู่ จะต้องทำการสั่งซื้อใหม่อีกครั้ง
รายการที่แจ้งชำระเงินก่อนเวลา 13:00น. จะทำการจัดส่งในวันทำการเดียวกัน รายการที่แจ้งชำระเงินหลัง 13:00น. จะจัดส่งในวันทำการถัดไป โดยจะทำการจัดส่งทุกวัน จันทร์-ศุกร์ และวันหยุด เป็นบางวัน ตามที่ผู้ขายสะดวก
แจ้งโอนเงินก่อน 9.00 วันเสาร์ส่งวันเสาร์
หลังจากชำระเงินแล้ว คลิ๊กที่นี่ เพิ่อแจ้งชำระเงินทันที โดยไม่ต้องโทรมาแจ้งอีก ถ้าไม่สะดวก ไม่ต้องแนบหลักฐานการโอนก็ได้ แต่กรุณาแจ้งธนาคาร และเวลาที่โอนที่ถูกต้อง จะได้ตรวจสอบได้ครับ
หน้าที่เข้าชม | 43,308 ครั้ง |
ผู้ชมทั้งหมด | 24,271 ครั้ง |
เปิดร้าน | 17 ก.ย. 2559 |
ร้านค้าอัพเดท | 8 ต.ค. 2568 |