PDA

View Full Version : baisic code question



cornflowerblue
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.

Newzed
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
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

cornflowerblue
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

metron9
11-18-2006, 04:33 AM
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!