Shop OBEX P1 Docs P2 Docs Learn Events
new to javelinstamp...how do you put multiple classes on the stamp? — Parallax Forums

new to javelinstamp...how do you put multiple classes on the stamp?

Tony TranTony Tran Posts: 3
edited 2007-02-24 19:00 in General Discussion
If my code consists of inheritances and multiple classes, how do I put them all on the board?· Whenever I "program" a class in, it erases all the information on the board.·

In General: if I have class A, class B extends A, how do I get both class A and B on the board? THanks in advance!

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-02-24 16:58
    The compiler/linker takes care of all this.
    All you need to do is to create a program (eg. class) that has
    a static void main() declaration.
    If there are any unresolved references, the compiler/linker
    will complain.

    regards peter
  • Tony TranTony Tran Posts: 3
    edited 2007-02-24 17:08
    Okay, here's basically what's up:

    I am trying to get the testMemsic accelerometer classes from the website you showed me a few weeks back to work. You have 3 classes that I need to have for everything to work right, the accerlerometer class, the memsic class that extends the accelerometer class, and the testmemsic class. Now, in the IDE, the only class that compiles completely is the accelerometer class, all other classes reference something that doesnt exist (bc it's in the other classes).

    When I try to program the accelerometer class, it says LinkError: no main method. This is understandable since the main method is in the testmemsic class. But then, the main method there references the memsic class...which doesnt exist in the accelerometer class. So...I am confused. Do you know how to implement the code you wrote at thatyahoo group?

    Thanks a bunch Peter!
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-02-24 19:00
    All the classes required are here:
    http://tech.groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/peripheral/sensor/accelerometer/

    (The folder layout on the yahoogroup mimics your javelin ide folder)
    Copy the classes to folder <Javelin IDE path>\lib\stamp\peripheral\sensor\accelerometer\
    If you don't have such a folder, then create one (use the EXACT names as here)
    The default javelin ide path is c:\program files\parallax inc\javelin stamp ide

    regards peter
    ·
Sign In or Register to comment.