View Full Version : baisic code question

11-18-2006, 02:45 AM
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.

11-18-2006, 02:57 AM
For the BS2 write:

Dio Pin 7

Sid Weaver
Don't have VGA?

Newzed@aol.com (mailto:Module?Newzed@aol.com)

Steph Lindsay
11-18-2006, 03:17 AM

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


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


I hope this helps,

-Stephanie Lindsay

Editor, Parallax Inc

11-18-2006, 03:22 AM
Thanks for the suggestions. I tried Newzed edit and it still gave me an error.

Expected ':' or end-of-line

11-18-2006, 04:33 AM
Check your top line you must have BS1 , that will cause the error :


' {$STAMP BS2}
' {$PBASIC 2.5}

Dio PIN 7


Think Inside the box first and if that doesn't work..
Think outside the BOX!