Shop OBEX P1 Docs P2 Docs Learn Events
TCS230-DB Color Sensor Colour Matching Demo Program — Parallax Forums

TCS230-DB Color Sensor Colour Matching Demo Program

skylightskylight Posts: 1,915
edited 2008-09-22 03:09 in General Discussion
I have a question regarding the demo program for the·colour sensor, in the pdf manual it states that you can store recorded colours on the numbered buttons for later sampling recall, in brackets it states until you exit the program.

My question is, is it possible for Parallax to incorporate the facility in the program·to save·sampled colour values permanently to the host PC HD or perhaps the ability for the program to read/write the stored values to an eeprom?

In other words so one can pre calibrate the program for later use without having to leave the pc on and the program running.


Post Edited (skylight) : 9/20/2008 5:51:09 PM GMT

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-09-20 22:04
    I wrote the host program for the TCS230-DB. As it stands, it does not include a way to save the sampled colors to disk. But that does not mean you can't do it yourself in your own PBASIC color-matching program. Once a color is established, you can save its RGB components to EEPROM using the WRITE command. Then, when you are viewing colors for comparison, you can access each of the saved colors using the READ command to find the one that matches most closely.

    -Phil
  • skylightskylight Posts: 1,915
    edited 2008-09-21 12:07
    Thanks Phil, I wasnt aware you were the author as i would have directed the question directly towards you, my apologies.

    I very much like the visuals and·operation·of your program and wonder if you were in the future likely to add such a feature?
    I think·the task of creating such a program for the pc would be out of my scope.

    I'm a bit confused regarding the Mobo board interfacing with·the sensor board, is this necessary in order to read value varaibles from the sensor board via the stamp or is it possible to directly talk to the sensor board via the stamp?··Would that·way be too complex for the stamp hence additional hardware.

    I think ive sussed it i found the bit about the forthcoming DB expander coming soon and assume from that i dont need to get into understanding the MoBo board and its co-processors·just yet·smile.gif







    Post Edited (skylight) : 9/21/2008 12:24:56 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-09-21 16:51
    skylight said...
    Thanks Phil, I wasnt aware you were the author as i would have directed the question directly towards you, my apologies.
    The forum is always the best place for questions like these. The more people who can benefit, the better. So no apologies necessary. You did the right thing.

    Adding a Save feature to the host program is "on my list" but not very near the top, I'm afraid. Typically, the color board/Stamp combo are used standalone and the color standards are stored internally in EEPROM (as I noted above) rather than in a PC.

    The important signal lines to and from the TCS230-DB either bypass its associated coprocessor on the Mobo completely or are shared with it, so your PBASIC program on the Mobo can be used to read the colors without involving a coprocessor. The only exceptions are pins S0 and S1, which set the output rate from the TCS230 chip. These are connected to the coprocessor only and can be set at the beginning of your program and forgotten thereafter. The example code on the Parallax website includes this simple step. (In point of fact, even this step can be ignored if you want, since both S0 and S1 are pulled high on the DB. Just make sure the default GPIO3.hex program is loaded in the associated coprocessor, so thes lines are left floating.)

    The DB-Expander has been available for some time now. Can you tell me, please where you saw the "coming out soon" notice. We need to get that fixed.

    Thanks,
    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • skylightskylight Posts: 1,915
    edited 2008-09-21 20:06
    Again im grateful for your assistance, the "coming soon" reference is in the color sensor paragraph on this page:

    http://www.parallax.com/ProductInfo/Microcontrollers/BASICStamp2peMotherboard/tabid/528/Default.aspx
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-09-22 03:09
    Thanks, skylight. I've passed this along to someone at Parallax who can take care of it.

    -Phil
Sign In or Register to comment.