Shop OBEX P1 Docs P2 Docs Learn Events
How can I get the DEBUG function to work? — Parallax Forums

How can I get the DEBUG function to work?

edited 2008-09-04 00:27 in BASIC Stamp
I'm pretty new to the BS/2 (and programming microcontrollers in general).· I've been using the DEBUG·to try and·troubleshoot some of the code I've made.· I made a simple LED flasher program to try and figure this out, with the output port and a variable put into DEBUG.· DEBUG is showing that the variable is staying at 0 and not incrementing, and even though the LED is flashing like it's supposed to, DEBUG shows the output port not transitioning.· I've attached a copy of the code.· Any ideas?

Thanks!!

Rick

Comments

  • MSDTechMSDTech Posts: 342
    edited 2008-09-03 22:16
    Move the DEBUG statements into your DO .. LOOP. The stamp only sends information to the debug terminal when it encounters the DEBUG statement. So your program sends the data once and then never resends in the loop.

    I've attached your code with the revision.

    The HOME formatter moves the cursor to the top of the screen, so the output should be placed over itself for each iteration (or you can take it out and watch the data roll down the terminal).
  • edited 2008-09-04 00:27
    Why didn't I think of this before? You're absolutely right, this works great! This is going to make all future programming for me about a 1000X easier!!

    Thanks!!

    Rick
Sign In or Register to comment.