Shop OBEX P1 Docs P2 Docs Learn Events
What am I doing wrong with COGNEW? — Parallax Forums

What am I doing wrong with COGNEW?

HughHugh Posts: 362
edited 2013-05-04 02:15 in Propeller 1
One of those hair-pulling moments...

In the attached file I start a couple of cogs via COGNEW (line 85, line 98), one of which is PUB 'ReadGPS'.

If the PUB 'ReadGPS' (line 129) is empty or commented-out the last cog to start (via line 98) is reported as '4' and it works as expected. With the code in PUB 'ReadGPS' - essentially 'flash an LED' - neither of the cogs start (-1 is returned after line 85).

I've tried changing the size of the stack, etc. Half the time, it just resets and starts again...

I can only apologise that reading this post requires a delve into some pretty poor code, but I am well and truly stuck! :frown:

Any suggestions gratefully received!

BOAT29 - Archive [Date 2013.05.03 Time 20.54].zip

Comments

  • HarpritHarprit Posts: 539
    edited 2013-05-03 14:03
    Just off the top of my head, the first ' in the PUB call makes the rest of the line a comment
    (I could not read the attached file into my computer)
    H
  • HughHugh Posts: 362
    edited 2013-05-04 02:15
    I think I've solved it. I was powering a Project Board from the USB. Adding an additional power supply got things working again.
Sign In or Register to comment.