Shop OBEX P1 Docs P2 Docs Learn Events
how to use debug home ? — Parallax Forums

how to use debug home ?

ayu'meayu'me Posts: 2
edited 2004-09-14 14:01 in BASIC Stamp
hi,

···· lets say i have one program sound like this

···· debug home "L= ",dec5,left_IR

···· what if i want to add another debug line like this

···· debug "beep"

···· will the "beep" overwrite the command above?

···· if yes, what should i do to avoid it?

please teach me, if posible pls show some sample, thanks

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-13 13:35
    Just use DEBUG BELL and it won't overwrite your data, just beep the PC speaker.· BTW, the formatting of your original code is wrong too, it should be:

    DEBUG·HOME,·"L= ", DEC5 left_IR

    instead of:

    debug home "L= ",dec5,left_IR

    Hope this helps...A complete list of DEBUG commands can be found in the On-Line help files under DEBUG.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • ayu'meayu'me Posts: 2
    edited 2004-09-14 08:27
    dear chris,

    Thanks alot for your kindess help, but the keyword "DEBUG BELL" i don't know how to use so would you please help he with some example or pls show me the website to get the info. I have search it ( the help ) by using Google but i can't find it, the nearest results it give me is under this website "http://www.selmaware.com/stampplotlite/HtmlFiles/Hlp_BSAB_Example.htm" and the usage is DEBUG "!BELL".... so i don't know how to use beside, the real thing i want is i wish to add a photoresistor and Infrared into my boebot and detect the reading both at the same time ( there is a break about 20ms between the two device ) so if i set my infrared device to get the latest reading and show it on the terminal and ask the photoresistor to check the environment and display the reading on the screen both together, how to manage it? Lests say my program sound like this


    debug home "L = ", DEC5 L_IR, "R = ", DEC5 R_IR
    debug home "L = ", DEC5 L_PR, "R = ", DEC5 R_PR

    where IR stands for Infrared and PR stands for photoresistor
    of course L is left and R is right
    if i run the above program, sure the PR value will overide the IR value right? if yes, how to ask it to show both value on the terminal and how to set it? Please help me, thanks.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-14 14:01
    ayu'me said...
    Thanks alot for your kindess help, but the keyword "DEBUG BELL" i don't know how to use so would you please help he with some example
    debug home "L = ", DEC5 L_IR, "R = ", DEC5 R_IR
    debug home "L = ", DEC5 L_PR, "R = ", DEC5 R_PR
    where IR stands for Infrared and PR stands for photoresistor of course L is left and R is right if i run the above program, sure the PR value will overide the IR value right? if yes, how to ask it to show both value on the terminal and how to set it? Please help me, thanks.
    Okay, first of all, there's no keyword DEBUG BELL...DEBUG is the keyword, and BELL is a built-in command to beep the PC speaker.· It's kinda like when you do DEBUG HOME...HOME tells the cursor to go home, well BELL tells the PC speaker to beep...As for not printing over your previous line, don't make it go home and it won't...Maybe try this...

    DEBUG HOME, BELL
    DEBUG "L = ", DEC5 L_IR, "R = ", DEC5 R_IR
    DEBUG "L = ", DEC5 L_PR, "R = ", DEC5 R_PR

    This will home the cursor, beep the PC speaker, print the first line, then print the second line below it...


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
Sign In or Register to comment.