Grove - I2C Color Sensor User Manual

Similar documents
Grove - Gas Sensor(MQ9)

Grove - 433MHz Simple RF link kit User Manual

Grove - Collision Sensor

Grove - HCHO Sensor. Release date: 9/20/2015. Version: 1.0. Wiki:

User Manual. Grove - IR Distance Interrupter. Release date: 2015/9/22. Version: 1.0

APDS-9960 RGB and Gesture Sensor Hookup Guide

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Adafruit 16-Channel Servo Driver with Arduino

Grove - Infrared Receiver

EARTH PEOPLE TECHNOLOGY. EPT-200TMP-TS-U2 Temperature Sensor Docking Board User Manual

Adafruit 16-Channel Servo Driver with Arduino

ZX Distance and Gesture Sensor Hookup Guide

INA169 Breakout Board Hookup Guide

Application Note AN 102: Arduino I2C Interface to K 30 Sensor

TWEAK THE ARDUINO LOGO

FABO ACADEMY X ELECTRONIC DESIGN

Arduino and Servo Motor

Application Note. Communication between arduino and IMU Software capturing the data

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

Arduino Lesson 1. Blink. Created by Simon Monk

AS726X NIR/VIS Spectral Sensor Hookup Guide

Touch Potentiometer Hookup Guide

9DoF Sensor Stick Hookup Guide

Adafruit 16-Channel Servo Driver with Arduino

Gravity: 12-Bit I2C DAC Module SKU: DFR0552

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

Adafruit 16-channel PWM/Servo Shield

ArduCAM USB Camera Shield

Application Note AN 157: Arduino UART Interface to TelAire T6613 CO2 Sensor

18 CHANNELS LED DRIVER EVALUATION BOARD GUIDE

VMA435 DIGITAL ROTARY ENCODER MODULE USER MANUAL

HC-SR501 Passive Infrared (PIR) Motion Sensor

100UF CAPACITOR POTENTIOMETER SERVO MOTOR MOTOR ARM. MALE HEADER PIN (3 pins) INGREDIENTS

Introduction to the Arduino Kit

Adafruit 16-channel PWM/Servo Shield

VMA205 WIFI ESP8266 SHIELD

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

Adafruit SGP30 TVOC/eCO2 Gas Sensor

Arduino An Introduction

Milli Developer Kit Reference Application Published on Silver Spring Networks STAGE (

The wiring is relatively simple. You should put the module on one of the compatible Arduinos. The following are compatible:

DFRduino Romeo All in one Controller V1.1(SKU:DFR0004)

Montgomery Village Arduino Meetup Dec 10, 2016

ArduCAM USB Camera Shield

You'll create a lamp that turns a light on and off when you touch a piece of conductive material

CPSC 226 Lab Four Spring 2018

Module: Arduino as Signal Generator

36 CHANNELS LED DRIVER EVALUATION BOARD GUIDE

Capacitive Touch with Conductive Fabric & Flora

Peek-a-BOO Kit JAMECO PART NO / / Experience Level: Beginner Time Required: 1+ hour

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Community College of Allegheny County Unit 7 Page #1. Analog to Digital

Roborodentia Robot: Tektronix. Sean Yap Advisor: John Seng California Polytechnic State University, San Luis Obispo June 8th, 2016

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

Controlling motors with Arduino and Processing

MD04-24Volt 20Amp H Bridge Motor Drive

Studuino Color Sensor Manual

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

Robotic Arm Assembly Instructions

Arduino Workshop 01. AD32600 Physical Computing Prof. Fabian Winkler Fall 2014

Community College of Allegheny County Unit 4 Page #1. Timers and PWM Motor Control

nrf24l01+ Transceiver Hookup Guide

Training Schedule. Robotic System Design using Arduino Platform

IMU: Get started with Arduino and the MPU 6050 Sensor!

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

Moto1. 28BYJ-48 Stepper Motor. Ausgabe Copyright by Joy-IT 1

Arduino as a tool for physics experiments

keyestudio keyestudio Mini Tank Robot

Coding with Arduino to operate the prosthetic arm

The PmodIA is an impedance analyzer built around the Analog Devices AD bit Impedance Converter Network Analyzer.

DESCRIPTION DOCUMENT FOR WIFI SINGLE DIMMER ONE AMPERE BOARD HARDWARE REVISION 0.3

TC4 Shield Version 6.02

VMA314 PIR MOTION SENSOR FOR ARDUINO USER MANUAL

Adafruit Si4713 FM Radio Transmitter with RDS/RDBS Support

LED Driver 5 click. PID: MIKROE 3297 Weight: 25 g

1. Introduction to Analog I/O

Datasheet High Precision and ultra small vector sun sensor with digital interface

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech

OTTO THE BIPEDAL ROBOT

Welcome to Arduino Day 2016

Grove - Infrared Temperature Sensor

Applications Robotics Animatronics Mechatronic Art

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman

Lesson 3: Arduino. Goals

The SCX18.S provides dual high power regulators capable of supplying 3A to the connected servos from an external Li-Pol or

LoRa Quick Start Guide

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link).

VMA333 TB6560 3A STEPPER MOTOR DRIVER BOARD USER MANUAL

Sten BOT Robot Kit 1 Stensat Group LLC, Copyright 2016

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

ASCOM EF Lens Controller

1Getting Started SIK BINDER //3

CONSTRUCTION GUIDE Light Robot. Robobox. Level VI

Lesson 13. The Big Idea: Lesson 13: Infrared Transmitters

EM Arduino 4-20mA Shield Documentation. Version 1.5.0

MicroWave Sensor SKU: SEN0192

Mill One V2 Assembly Manual

Arduino: Sensors for Fun and Non Profit

Transcription:

Grove - I2C Color Sensor User Manual Release date: 2015/9/22 Version: 1.0 Wiki:http://www.seeedstudio.com/wiki/index.php?title=Twig_-_I2C_C olor_sensor_v0.9b Bazaar:http://www.seeedstudio.com/depot/Grove-I2C-Color-Sensor-p -854.html 1

Document Revision History Revision Date Author Description 1.0 Sep 22, 2015 jiankai.li Create file 2

Contents 1. Introduction 2 2. Specification 3 3. Demonstration 4 4. With Arduino/Seeeduino 5 4.1 Suggest Reading for Starter 5 4.2 Hardware Installation 5 4.3 Color Sensor Library 5 4.4 Color Sensor Examples/Applications 6 5. Resources 8 6. Other Reference 9 3

Disclaimer For physical injuries and possessions loss caused by those reasons which are not related to product quality, such as operating without following manual guide, natural disasters or force majeure, we take no responsibility for that. Under the supervision of Seeed Technology Inc., this manual has been compiled and published which covered the latest product description and specification. The content of this manual is subject to change without notice. Copyright The design of this product (including software) and its accessories is under tutelage of laws. Any action to violate relevant right of our product will be penalized through law. Please consciously observe relevant local laws in the use of this product. 1

1. Introduction This module is based on the color sensor TCS3414CS with digital output I2C. Based on the 8*2 array of filtered photodiodes and 16-bit analog-to-digital converters, you can measure the color chromaticity of ambient light or the color of objects. Of the 16 photodiodes, 4 have red filters, 4 have green filters, 4 have blue filters and 4 have no filter(clear). With the synchronization input pin, an external pulsed light source can provide precise synchronous conversion control. 2

2. Specification PCB Size :2.0cm*4.0cm Interface :2.0mm pitch pin header IO Structure :SCL,SDA,VCC,GND ROHS :YES VCC :3.3 ~6.0 V Operating Free-air Temperature :-40 ~ 85 C 3

3. Demonstration This module can be used to detect the color of light source or the color of objects. When used to detect the color of the light source, the led switch should be turned off, and the light source should shine the sensor directly. When used to detect the color of things, the led should be on and you should put the object on the top of the enclosure closely. The theory of sensing the color of objects is Reflective Sensing Theory. Like the picture below. 4

4. With Arduino/Seeeduino 4.1 Suggest Reading for Starter Download Arduino and install Arduino driver Getting Started with Seeeduino/Arduino 4.2 Hardware Installation Grove products have a eco system and all have a same connector which can plug onto the Base Shield. Connect this module to the I2C port of Base Shield, however, you can also connect Grove - I2C Color Sensor to Arduino without Base Shield by jumper wires. Arduino UNO 5V GND SDA SCL Grove - I2C Color Sensor VCC GND SDA SCL 4.3 Color Sensor Library We have created a library to help you start playing quickly with the Seeeduino/Arduino, in this section we'll show you how to set up the library. Setup Download the library code as a zip file from the Grove_I2C_Color_Sensor github page. Unzip the downloaded file into your /arduino/libraries. Rename the unzipped folder "Color_Sensor" Start the Arduino IDE (or restart if it is open). Description of functions These are the most important/useful function in the library, we invite you to look at the.h and.cpp files yourself to see all the functions available. 1. Read RGB data through the library function readrgb(int *red, int *green, int *blue) *red: The variable address to save R. *green: The variable address to save G. *blue: The variable address to save B. 5

void loop() { int red, green, blue; GroveColorSensor colorsensor; colorsensor.ledstatus = 1; // When turn on the color sensor LED, ledstatus = 1; When turn off the color sensor LED, ledstatus = 0. while(1) { colorsensor.readrgb(&red, &green, &blue); //Read RGB values to variables. delay(300); Serial.print("The RGB value are: RGB( "); Serial.print(red,DEC); Serial.print(", "); Serial.print(green,DEC); Serial.print(", "); Serial.print(blue,DEC); Serial.println(" )"); colorsensor.clearinterrupt(); } } 4.4 Color Sensor Examples/Applications These example are going to show you how to use features of Grove - I2C Color Sensor. And via Chainable RGB LED Grove to display the detected color. Notice: If you haven't download Grove-Chainable RGB LED library to your Arduino IDE before, please download and set up the library first. Open File->Examples->Color_Sensor->example->ColorSensorWithRGB-LED sketch for a complete example, or copy and paste code below to a new Arduino sketch. Description: This example can measure the color chromaticity of ambient light or the color of objects, and via Chainable RGB LED Grove displaying the detected color. You also can use other display module to display the detected color by Grove - I2C Color Sensor. #include <Wire.h> #include <GroveColorSensor.h> #include <ChainableLED.h> #define CLK_PIN 7 #define DATA_PIN 8 #define NUM_LEDS 1 //The number of Chainable RGB LED 6

ChainableLED leds(clk_pin, DATA_PIN, NUM_LEDS); void setup() { Serial.begin(9600); Wire.begin(); } void loop() { int red, green, blue; GroveColorSensor colorsensor; colorsensor.ledstatus = 1; // When turn on the color sensor LED, ledstatus = 1; When turn off the color sensor LED, ledstatus = 0. while(1) { colorsensor.readrgb(&red, &green, &blue); //Read RGB values to variables. delay(300); Serial.print("The RGB value are: RGB( "); Serial.print(red,DEC); Serial.print(", "); Serial.print(green,DEC); Serial.print(", "); Serial.print(blue,DEC); Serial.println(" )"); colorsensor.clearinterrupt(); for(int i = 0; i<num_leds; i++) { leds.setcolorrgb(i, red, green, blue); } } } Upload the code to the development board. Then Grove_-_Chainable_RGB_LED would display the color which is detected. 7

5. Resources Library Grove - I2C Color Sensor Grove-I2C Color Sensor Eagle File TCS3414-A Datasheet 8

6. Other Reference This module is based on the color sensor TCS3414CS. The TCS3414CS digital color sensor returns data from four channels: red(r), green(g), blue(b) and clear(c)(non-filtered). The response from the red, green and blue channels (RGB) can be used to determine a particular source s chromaticity coordinates (x, y). These standards are set by the Commission Internationale de l Eclairage (CIE). The CIE is the main international organization concerned with color and color measurement.in order to acquire the color of a given object using TCS3414CS, we must first map the sensor response (RGB) to the CIE tristimulus values (XYZ). It is then necessary to calculate the chromaticity coordinates (x, y). The equations to do the transformation: Chromaticity Calculation Process Overview Transformation Equations When we get coordinates (x, y), please reference the below figure so as to get the recommended color. 9

10