Shop OBEX P1 Docs P2 Docs Learn Events
Programming help and other stupid questions — Parallax Forums

Programming help and other stupid questions

dlinebardlinebar Posts: 13
edited 2009-11-28 09:19 in Robotics
Ok so I want to thank the Parallax guys they helped me get my USB servo board working. I can move my little robot arm now using the Parallax software but I want to write my own programs now an I am not sure what most people use. What programming language do most people use to run the robots they build? I was looking at Free Basic which is easy and looks good, I know I have seen some using VB, and I think there is some programming language Parallax made but I am not sure....I want it to be ...free... and my Robot will be tied to a PC so I will actually be controlling it from the PC....what do you guys use. I am hoping to learn and take advantage of code others have published....and advice or pointers would be appreciated....I have done pleanty of programming so any language is fine with me I just dont want to re-invent the wheel and want to use the one that seems to be most popular and is supported by the hobbiest the most...

Thanks!
Dan

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-06 17:23
    People use all sorts of languages on PCs for controlling robots. There's even a specialized version of Basic for robot control (RoboBasic). Some people use Visual Basic. What's "most popular" or "most supported" is strictly a matter of opinion and varies widely depending on who you ask. You'll have to do some web browsing to see what other people are using and what appeals to you.
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-11-06 18:02
    VB.NET, or C#.NET might be good for this purpose. C#.NET gives you bragging rights, too.
  • ercoerco Posts: 20,256
    edited 2009-11-08 01:42
    Nothing wrong with Parallax PBasic (or get into Spin, Propeller programming). We know it, we love it! Flexible, easy to learn, plenty of existing projects, code examples and informed Forum help from MikeG and the gang. If you find a better support group for another language, please advise!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • dlinebardlinebar Posts: 13
    edited 2009-11-14 02:18
    Ok so I am not sure where to get PBasic....I want to run a pogram on a PC and control the robot, can you point me at where I can find PBASIC? I figured out how to do it with JBasic but I am sure you are right an PBasic is the way to go I just cannot figure out where to get it.......

    Dan
  • dlinebardlinebar Posts: 13
    edited 2009-11-14 02:23
    Ok so after a little research I don't think PBasic can be used to send the serial commands to my device directly is that correct? I want to go serial direct to the Parallax USB servo controller and not use·a Stamp board or anything...can PBasic do that? HELP, I would love to use a common language others have used and take advantage of lessons learned.



    Dan
  • FranklinFranklin Posts: 4,747
    edited 2009-11-14 03:26
    What do you have on your computer that can send serial communications to a com port? That is what you will use to send data to the controller board.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • dlinebardlinebar Posts: 13
    edited 2009-11-14 17:20
    Most any computer language can send data to the COM ports...In JBasic here is code to send commands to the Parallax USB servo controller board. It is on COM 3.

    open "COM3:2400,n,8,1,ds0,cs0,rs" for random as #commHandle
    position0$ = "!SC"+CHR$(0)+CHR$(0)+CHR$(83)+CHR$(1)+CHR$(13)
    print #commHandle, position0$;
    close #commHandle

    This sends the command string to move the servos. I can move them no problem now but I was wanting to know if there is a language that is popular and people are using. PBasic needs to use the Stamp I think and I just wanted to know if there was a stand alone language people use.

    Dan
  • FranklinFranklin Posts: 4,747
    edited 2009-11-15 04:25
    I'm not sure what you mean by "stand alone". If you have the controller attached to the computer then, as you say there are many languages. If you plan to make this remote (robot or such) then the language of the microcontroller will be the one you will have to use and that will depend on the microcontroller you choose. The stamp uses PBasic and the propeller uses spin or asm but there is a pbasic type language object that will also work with the prop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • GeorgeCollinsGeorgeCollins Posts: 132
    edited 2009-11-21 05:35
    Mike is right that there is no standard language for controlling robots on a PC. You want to write programs that control your parallax servo controller, and through that controller manipulate an arm, correct?

    The best language is one that you like to work with, and has an easy interface to com ports on a PC. And by saying PC I am assuming Windows. I think the thing I have seen used the most for that is Visual Basic, because it is common, well documented, and plays nice with Windows hardware. C# is probably also fine, and a language that many experienced programmers prefer. I am not familiar with JBasic, but you have inspired me to check it out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Robots
  • dlinebardlinebar Posts: 13
    edited 2009-11-24 02:49
    Thanks, JBasic does not seem to bad. That is what I was looking for was just wondering what the most popular languages were.

    Dan
  • Brad_HBrad_H Posts: 35
    edited 2009-11-28 09:19
    Another good one to try is RobotBasic, http://www.robotbasic.org. It's free, easy to learn, and you get the advantage of having its creator, SamMishal, as a member of these forums.

    Brad

Sign In or Register to comment.