Shop OBEX P1 Docs P2 Docs Learn Events
tcs230data — Parallax Forums

tcs230data

PeterRPeterR Posts: 10
edited 2008-03-08 02:09 in BASIC Stamp
hello,· I have a BS2pe MB with the TCS230-DB· color sensor that has been programmed with the program called out in the "Getting Started" section of the documentation.· This set up is working fine.· I need to know how the data that scrolles in the debug terminal screen can be saved to so that it can be looked at in an excel or similar enviornment?· Is there a command that can be written inside the current PBasic program that would achieve this end?
Thank you, PeterR

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-03-05 18:00
    This is easy to do:

    1) Change the main loop of the demo program to print spaces between values, instead of the RGB designators:

    DO
      GOSUB  Color        'Get the color data, and output to DEBUG.
      DEBUG  DEC3 RED, " "
      DEBUG  DEC3 GREEN, " "
      DEBUG  DEC3 BLUE
      DEBUG  CR
      PAUSE  100
    LOOP
    
    


    I've also added a delay to slow down the scrolling a bit.

    2) Run the program. When enough data has scrolled by in the DEBUG screen, click the PAUSE button.

    3) Using your mouse, select the data you want to export to Excel by highlighting it, and press ctrl-C to copy it to the clipboard.

    4) Open a new Excel window and select the first cell. Press ctrl-V to paste the selected data. It will all end up in one column.

    5) In the menu, click Data->Text to Columns..., and follow the instructions from there (using the "fixed width" method) to get three columns of data — one for each color component.

    -Phil
  • PeterRPeterR Posts: 10
    edited 2008-03-05 18:25
    Thanks, for the info Phil. PeterR
  • CheeseCheese Posts: 29
    edited 2008-03-08 02:09
    Try this link to selmaware
    selmaware.com/selmaDAQ/home.htm
    I use there program and it works great
    you can automatically chart and save based on time or input data points.
Sign In or Register to comment.