Shop OBEX P1 Docs P2 Docs Learn Events
C++ instead of PBasic — Parallax Forums

C++ instead of PBasic

PaigePaige Posts: 2
edited 2007-07-23 14:04 in BASIC Stamp
Is there a way to use C++ instead of PBasic to program the robots?

Thanks

Comments

  • ForrestForrest Posts: 1,341
    edited 2007-07-22 17:31
    Not possible with a Parallax Basic Stamp - as the PBasic interpreter is burned into the Stamp.

    You may want to look into the Parallax SX or Propeller processors - C is available (or soon to be available) for those processors.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-07-22 20:08
    You can't program the Basic Stamps in a language other than PBasic. If you are just looking for something more "C-like", take a look at the Javelin Stamp, which uses a form of Java.

    If you really want to experiment with robotics, the Basic Stamp, and C++, you can write a program that does indirect robotic control via a computer. The Basic Stamp will need to be programmed in PBasic, but a PC based control program cna be written in the language of your choice.

    The way it would work is that the BS2 & control program would communicate with each other, with the BS2 providing sensor information to the control program. The control program would then process the information, and give directions back to the BS2 based on the results.

    The Boe-Bot Microsoft Robotics Studio kit basically works in this manner, but you can do something similar with any configuration that allows you to communicate between a Basic Stamp & a PC, usually over a serial (wired or wireless) connection.

    Post Edited (Kevin Wood) : 7/22/2007 8:15:44 PM GMT
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2007-07-22 20:31
    Pbasic is so simple and is, much more powerful than most people think. Also, don't get caught up in the "Horsepower Wars". If you have a program that uses servos or requires some sort of pause statements, an SX28 @ 50_MIPS·with same amount of delays in the program, isn't going to perform any better (unless you use·Assembly) than Pbasic and a BS2. Pbasic allows you to·prototype a project faster and use less code.

    Post Edited (Capt. Quirk) : 7/22/2007 8:47:44 PM GMT
  • PaigePaige Posts: 2
    edited 2007-07-22 23:40
    Thanks everyone for the info.· I will look into the Boe Bot kit.


    Paige
  • hitswarehitsware Posts: 156
    edited 2007-07-23 00:45
    >Not possible with a Parallax Basic Stamp - as the PBasic interpreter is burned into the Stamp.

    Can't you bypass the intrepreter
    (or at least use it) to call
    'assembly' routines ?
  • TimCTimC Posts: 77
    edited 2007-07-23 01:14
    C++ can require a lot of memory and horsepower because of its extra functionality. As a result many C++ compilers are not available until you get to the larger chips. An ARM is such a chip. The ARM is MUCH larger and more powerful than the stamp with typically 32K of program space and 8K of ram at the low end. A lot of cell phones and PDA's are made with ARM chips. The PINK module also uses a high end processor that runs C++. Be ready to invest a lot of time and money before you can even write your first class statement.

    How about using the Parallax Java chip if you want OO?

    Regards
    Tim
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-07-23 09:23
    hitsware -

    There is no assembler on the PBASIC Stamp since it uses interpretive rather than compiled Basic. Try PBASIC you may like it.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-07-23 14:04
    And no, there is no facility in PBasic that would give you access to 'assembly level' routines.

    For that facility, the SX is a very nice platform.
Sign In or Register to comment.