Shop OBEX P1 Docs P2 Docs Learn Events
BS2 and C++ — Parallax Forums

BS2 and C++

Fatboyhd2kFatboyhd2k Posts: 1
edited 2004-09-16 04:36 in BASIC Stamp
Does anyone know if the BS2 will accept C++ code? I have a book called C++:The complete reference and the author, Herb Schildt has a robot he built using a BS2 stamp he says was programmed with C++.
Thanks,
Darryl

Comments

  • CPUMANCPUMAN Posts: 55
    edited 2004-09-15 04:06
    That’s doubtful, as the basic stamp uses a proprietary interpreter from parallax that executes tokens generated by the PBasic compiler.· Maybe
    the auther·ment he wrote an interface program in C++·that the stamp communicates with?

    So basicly no, the basic stamp can't be programmed in C++. Only in PBasic.

    You can however get a C++ compiler for the SX.

    Chris
  • DonDon Posts: 34
    edited 2004-09-16 04:36
    Generally, C++ is not a particularly good fit for many microcontrollers primarily due to the need for a memory manager.· Some folks do it though.· Given the relatively small amount of RAM available on the BS/2 I would say that it is nigh well impossible.··There are a lot of people, myself included,·that program other microcontrollers (AVR, PIC, 8051, etc.) in C.

    It is possible that the author to whom you referred has built a specialized program in C++ that runs on another platform (e.g. a PC with Windows or Linux) which generates data that the BS2 uses to control the robot.· It might even generate PBasic tokens for a control program.· It's difficult to conjecture not having seen the book.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don Kinzer

    ·
Sign In or Register to comment.