element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Get Closer Wearables Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Get Closer Wearables Design Challenge
  • More
  • Cancel
Get Closer Wearables Design Challenge
Blog FLORA Color Sensor TCS34725 issue
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: chris.carter
  • Date Created: 29 Aug 2013 3:46 PM Date Created
  • Views 721 views
  • Likes 0 likes
  • Comments 1 comment
  • get_closer_challenge
  • adafruit
  • arduino
  • get_closer
Related
Recommended

FLORA Color Sensor TCS34725 issue

chris.carter
chris.carter
29 Aug 2013

For our furry cosumes, I want the orange leds in one costume to trigger red neopixels in another costume to light up.  However, whenever I shine the light of the orange led strip on the FLORA color sensor the color sensor shuts down after about three readings and the serial monitor stops printing readings.  Then I have to reload the tcs34725 sketch twice before the color sensor will begin again.  This happens whether the color sensor onboard led is on or not.  I am running the led strip at a low voltage and am not overpowering the color sensor with light.  Has anyone faced this problem before?  I am using the example code below.

 

#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.setInterrupt(true);  // turn off LED

  tcs.getRawData(&r, &g, &b, &c);

  colorTemp = tcs.calculateColorTemperature(r, g, b);

  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(" ");

}

  • Sign in to reply
  • zengirl2
    zengirl2 over 12 years ago

    Chris,  I haven't tried my color sensor yet to see if I have a similar issue.  I know working in video the colors of red and orange can be problematic.  Does the same happen with other colors or is it just on these.  I'm sure you have probably tried Adafruit's forum already -- I would definitely post your question there if you haven't already.  I know I won't be home this evening, but I will try to test my color sensor tomorrow since I will need to use it on my umbrella anyway.  I will definitely try different colors to see what happens and report back.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube