Shop OBEX P1 Docs P2 Docs Learn Events
Is A BS2 able to handle compass sensor and 433Tx? — Parallax Forums

Is A BS2 able to handle compass sensor and 433Tx?

skybotskybot Posts: 14
edited 2008-12-07 23:03 in BASIC Stamp
Hi all,
I am using a bs2 chip for a compass sensor and a 433 tx.
My original idea is sending data from compass sensor via 433 tx.
What a problem I have is that I cannot combine 2 code (one is compass code and the other is tx code) due to "out of variable space" error message.
1> How big is the variable space per bs2 chip?
2> Is adding more·bs2 chips only solution·or is there a other way to do it?
Please help me.
Thank you.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-07 23:03
    1) The variable space is 26 bytes or 13 words.

    2) Adding more BS2 chips won't solve your problem.

    Most code uses some of its variables only part of the time. Some are used for temporary storage during subroutines and never are used to hold information across subroutine calls. These variables can be reused for other parts of the code. The Stamp Editor has the capability to use alternate names for the same variables. Look in the section of the Stamp Basic Manual on "aliases" to see how this is done. That will probably solve your problem.
Sign In or Register to comment.