Shop OBEX P1 Docs P2 Docs Learn Events
I need a device that can distinguish between two different colored products — Parallax Forums

I need a device that can distinguish between two different colored products

DunnerDunner Posts: 6
edited 2007-11-26 00:56 in BASIC Stamp
I am·building a microproject. I need a device that can distinguish between two different products.(different colored products). Will a photoresistor do this or a IR sensor.·Is there any suggestions as to other devices.

Post Edited By Moderator (Chris Savage (Parallax)) : 11/26/2007 3:23:17 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-22 18:41
    Neither a photoresistor nor an IR sensor will do what you want. It sounds like you want to distinguish the products by their color.
    Have a look at this color sensor and its documentation and code examples:
    www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/List/1/ProductID/429/Default.aspx?txtSearch=color+sensor&SortField=ProductName%2cProductName.
  • crgwbrcrgwbr Posts: 614
    edited 2007-11-22 19:08
    theoretically you could use photo resister if you could illuminate the object in red, green, and blue lights. For example, if you're photo resister was connected to an 8-bit a/d converter, max light would be 255 and no light would be 0. If the object is red, it will reflect only red light, if its blue, it will reflect only blue light, etc. Then by sequentially lighting the RGB lights, you could determine the exact RGB values of the object, and determine one color from and another.

    Regards,
    Craig

    P.S. Also, please add a subject to your original post.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs." -

    "If Python is executable pseudocode, then perl is executable line noise."

    "The best accelerator available for a Mac is one that causes it to go at 9.81 m/s2."

    "My software never has bugs. It just develops random features."

    "Windows isn't a virus, viruses do something."

    "Programmers are tools for converting caffeine into code."

    "Enter any 11-digit prime number to continue."
  • neotericneoteric Posts: 144
    edited 2007-11-26 00:36
    I'm guessing this could be done...··you could use three photosensors, and put and red green and blue filter over each. (or colored cellophane)· Years ago I did this with the joystick port on a pc.· I got very accurate color by reading the combination of the three.· (red light goes through red filter, etc.)· this way, you can read almost any color...)
  • neotericneoteric Posts: 144
    edited 2007-11-26 00:56
    I have the same issue.· Directv.· I use this product, works better than anything I have ever used.

    http://www.amazon.com/Next-Generation-Remote-Control-Extender/dp/B000C1Z0HA/ref=pd_bbs_2?ie=UTF8&s=electronics&qid=1196038628&sr=8-2

    PS, I tried to make my own repeater, but it was not reliable enough.
Sign In or Register to comment.