Shop OBEX P1 Docs P2 Docs Learn Events
color Sensor — Parallax Forums

color Sensor

CJWCJW Posts: 77
edited 2010-05-21 07:04 in BASIC Stamp
Hi,

Is there any basic programming for programming. I have try using the pdf for the color sensor. but it never do anything.


Yours Sincerely,
James

Comments

  • CJWCJW Posts: 77
    edited 2010-05-20 07:11
    Hi,

    My boe-bot have IR and gripper. I trying to modify to put in color sensor together. Is there any example of code to assist. Thank you
    I have modify the thing can help me check. thank you

    Yours Sincerely,
    James
  • CJWCJW Posts: 77
    edited 2010-05-20 15:29
    Hi,

    Please help me. Thank you

    Yours Sincerely
    James
  • CJWCJW Posts: 77
    edited 2010-05-21 06:47
    Hi,

    Is there anybody understand this coding as i saw the example color sensor programming.
    pRED CON 13
    pGREEN CON 12
    pBLUE CON 11

    I don't understand the "CON" and "13, 12, 11"

    Please Help me. Thank You

    Yours Sincerely,
    James
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-05-21 07:00
    James,

    You may need to back up a couple steps and become more familiar with PBASIC before attempting to merge the color sensor stuff with your other program. If don't already have a copy of the PBASIC manual, you can download it from www.parallax.com, along with a wealth of introductory programming tutorials.

    The CON directive just assigns a value to a symbolic constant name, which can then be used in place of the numeric literal in your program. In this case, the integration times for red, green, and blue are assigned the values 13, 12, and 11 respectively.

    But do study up on PBASIC first by writing some simpler programs from scratch. Then you'll be able to fit the pieces of the color sensor together with the other aspects of your program more easily and -- best of all -- be able to understand what you're doing and why you're doing it..

    -Phil
  • CJWCJW Posts: 77
    edited 2010-05-21 07:04
    Hi,

    Thank you Phil. I just figure out the Con 13,12,11. As I saw the two example I can understand how it works a bit.


    James
Sign In or Register to comment.