Using BS2 with Basic 1.0
Hi...
I have a project to do with a BS2, but I have a code written in Basic 1.0.
Is it possible to use the BS2 with the given code, or will I need to convert it to Basic 2.0?
If I need to convert, can anyone direct me to the appropriate literature?
Many thanks in advance,
Krishen··
I have a project to do with a BS2, but I have a code written in Basic 1.0.
Is it possible to use the BS2 with the given code, or will I need to convert it to Basic 2.0?
If I need to convert, can anyone direct me to the appropriate literature?
Many thanks in advance,
Krishen··

Comments
The new Windows PBasic editor does a nice job of pointing out syntax errors and using different colors to show you "recognized" code. I suggest you load your PBasic 1.0 code into the editor with the BS2 and PBasic 2.0 or 2.5 directives, then let the editor point out syntax errors as you go. You'll be BS2-ing in no time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
You have posted this question in 4 threads in multiple forums. This is against the forum guidelines. Two of the four threads have been removed. Please post follow-up questions in existing threads in the future.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Let me elaborate:
I'm trying to replicate the project done here (http://forums.parallax.com/attachment.php?attachmentid=50010), and I've run into a few problems.
Primarily, I'm struggling with the conversion from Pbasic 1.0 to 2.5. Is it possible to use the code given in the link for a project using the BS2? That appears to be what the original people who did the project managed to do, but I don't understand how it would be possible.
Again, would it be at all possible to use the code given to get the project to work with a Basic Stamp 2?
Many thanks in advance,
Krishen
EDIT: This is what I have so far, converted from Pbasic to Pbasic 2.5:
PCell··· PIN 0
PCellPin CON 0
Light1·· PIN 1
Light2·· PIN 2
Light3·· PIN 3
Scale··· CON 200
OUTPUT 1
OUTPUT 2
OUTPUT 3
read_pcell:
· RCTIME pcellpin,scale,B2· ' This might need to be fixed to read the capacitor properly.
· DEBUG B2
· GOTO read_pcell
is_light1_on:
· IF B2>200 THEN light1_on
light1_off:
· light1=0
· GOTO is_light2_on
light1_on:
· light1=1
is_light2_on:
· IF B2>100 THEN light2_on
light2_off:
· light2=0
· GOTO is_light3_on
light2_on:
· light2=1
is_light3_on:
· IF B2>40 THEN light3_on
light3_off:
· light3=0
· GOTO is_light4_on
light3_on:
light3=1
is_light4_on:
GOTO read_pcell
' End of code.
Is this properly converted?
Post Edited (Krishen) : 5/23/2008 7:21:05 PM GMT