Shop OBEX P1 Docs P2 Docs Learn Events
TCS 3200-DB Color Sensor Module — Parallax Forums

TCS 3200-DB Color Sensor Module

B.ASHISHB.ASHISH Posts: 28
edited 2012-04-26 09:02 in Propeller 1
I'm using Parallax DB Expander to interface the TCS3200 color sensor module on the propeller demoboard.
I fixed the sensor module to the db expander but the leds are not glowing when I gave +5v from the demoboard to the +5v of the db expander and GND of demo board to that of DB Expander.
Please help me with all these basic connections.I already got the code.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-25 07:50
    The LEDs are turned on by your program and not supposed to come on as soon as the module is powered up. Have you tried running the code yet?

    -Phil
  • B.ASHISHB.ASHISH Posts: 28
    edited 2012-04-25 08:03
    Yes sir ,I tried running the code,but still LEDs are not on.Is there any additional connection I need to do?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-25 08:07
    Please post your code.

    -Phil
  • B.ASHISHB.ASHISH Posts: 28
    edited 2012-04-26 00:52
    Sir the sensor is running.It is displaying values for red,blue,green.When red object is placed in front of the sensor,the value of red gets reduced.Here,s the code.
    {
    
    
    This is the example code for the TAOSDriver. Pins are connected as follows:
    
    
    0 = PinC = OUT
    1 = PinD = LED
    2 = PinE = S2
    3 = PinF = S3
    
    
    The method calls are as follows:
    
    
    taos.getClear(PIN)
    taos.getRed(PIN)
    taos.getBlue(PIN)
    taos.getGreen(PIN)
    
    
    Where PIN is Pin 0 (OUT)
    
    
    When running this code, open the Parallax Serial Terminal and set the Buad to 115200. You should see simillar:
    
    
    Clear = 125
    Red = 131
    Blue = 512
    Green = 142
    
    
    }
    
    
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
      
    OBJ
      taos : "TAOSDriver"
      pst : "Parallax Serial Terminal"
    
    
    PUB main
    
    
    pst.start(115200)
    
    
    repeat
      pst.Clear    'Clear screen
      pst.str(string("Clear:"))    'Clear sensor readings.
      pst.dec(taos.getClear(0))
      pst.NewLine
      pst.str(string("Red:"))      'Red sensor readings.
      pst.dec(taos.getRed(0))
      pst.NewLine
      pst.str(string("Blue:"))     'Blue sensor readings.
      pst.dec(taos.getBlue(0))
      pst.NewLine
      pst.str(string("Green:"))    'Green sensor readings.
      pst.dec(taos.getGreen(0))
      pst.NewLine
      
      waitcnt(clkfreq/10 + cnt)
    
    The values it is displaying,(though they are varying continuously) is;
    Blue:1416
    Red:876
    Green:1157.
    I am not able to understand what these values indicate.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-04-26 09:02
    Where did the "TaosDriver" program come from? Can you post it here, please?

    -Phil
Sign In or Register to comment.