Shop OBEX P1 Docs P2 Docs Learn Events
ColorPAL Troubles — Parallax Forums

ColorPAL Troubles

John BoardJohn Board Posts: 371
edited 2012-07-22 17:49 in Accessories
G'day,

I'm desperatly getting ready for a robotics comp and I've been (continually) having trouble with the ColorPAL sensors. Mainly the just stop working, with no aparent reason, I will try and get more details up ASAP (Code, etc), like within the next 10 minutes, but I thought maybe it was a well-known-problem-that-I-don't-know-about... yet...

All help accepted gratfully!

-John

P.S. By memory, I'm using this ColorPAL Driver: http://obex.parallax.com/objects/629/

Comments

  • John BoardJohn Board Posts: 371
    edited 2012-07-22 00:17
    The code is attached in the .zip (?) format - as archived by Propeller Tool 1.3

    The wiring of the sensor is as per normal, with a 3-pin header extension wire.

    Sig, VDD, GNDJaws.zip
  • John BoardJohn Board Posts: 371
    edited 2012-07-22 00:20
    The issue is the sensor seeming to 'freeze' sensing - So, when normally the colors are changing, they freeze on a color.

    For example:

    1. I set the robot up on the course
    2. I switch on the motors
    3. The robot does what it normally does
    4. At some unknown time in the course the sensors stop 'scanning colors' and freeze on any perticular color (Any one).
  • Mike GreenMike Green Posts: 23,101
    edited 2012-07-22 11:27
    There's nothing in the ColorPAL driver or the ColorPAL that would do what you describe. More likely, your program is accessing an array out of bounds or you've got two cogs trying to reference the same object or same variables at the same time. Your debug cog seems to have a large enough stack, but your program is too large and too complex to tell without a lot of work.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-22 12:03
    25 longs might be on the small size for the stacks you have in your sensors object. You might try increasing these stacks.
  • John BoardJohn Board Posts: 371
    edited 2012-07-22 15:54
    Okay! I'll look into these responses! I've been looking into an avenue of possibly the "SlowSensorLoop" crashing (not enough stack?), I've created a system to see if the loop has crashed or not - But now nothing is going wrong.... I bet when I NEED the sensors to work they'll conk out again....

    I'll keep you informed!

    -John
  • John BoardJohn Board Posts: 371
    edited 2012-07-22 15:57
    Ohh! And any code-improvement ideas are also welcomed ( (EDIT: Fixing) inefficiencies, etc). But time is running out! I only have 5 days left of prep.

    John
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-07-22 17:42
    John,

    In the ColorPAL object. Change the baudrate to 7200.

    -Phil
  • John BoardJohn Board Posts: 371
    edited 2012-07-22 17:49
    Will do, thanks.
Sign In or Register to comment.