Shop OBEX P1 Docs P2 Docs Learn Events
baisic code question — Parallax Forums

baisic code question

cornflowerbluecornflowerblue Posts: 6
edited 2006-11-17 21:33 in BASIC Stamp
Sorry for my ignorance. I have just started learning baisic in order to program an accelerameter. I found sample code on the parralax website for a BS1 processer but I am using BS2. When I converted the stamp to BS2 some of the sample code no longer works. Unfortunately because of my lack of knowledge I have no idea why part of the program will not tolkenize.

SYMBOL Dio = PIN7 ' data to/from module

Above is an example of some code that causes an error. Also, I had to remove # infront of a lot of the code in order for it to tolkenize. Thanks for any help and have a great week.

Comments

  • NewzedNewzed Posts: 2,503
    edited 2006-11-17 19:57
    For the BS2 write:

    Dio Pin 7

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Don't have VGA?

    Newzed@aol.com
    ·
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2006-11-17 20:17
    Cornflowerblue,

    A good resource for beginning BS2 programmers is "What's a Microcontroller?" which is available as a free download here:

    http://www.parallax.com/detail.asp?product_id=28152

    The same author has written tutorials using the Memsic Dual-Axis Accelerometer, which are posted on the forum here:

    http://forums.parallax.com/showthread.php?p=560570

    I hope this helps,

    -Stephanie Lindsay

    Editor, Parallax Inc
  • cornflowerbluecornflowerblue Posts: 6
    edited 2006-11-17 20:22
    Thanks for the suggestions. I tried Newzed edit and it still gave me an error.

    Expected ':' or end-of-line
  • metron9metron9 Posts: 1,100
    edited 2006-11-17 21:33
    Check your top line you must have BS1 , that will cause the error :

    use

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    
    Dio PIN 7
    
    
    END
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Think outside the BOX!
Sign In or Register to comment.