Robot programming

This is a discussion on Robot programming within the C Programming forums, part of the General Programming Boards category; I am to program a robot, the TJ-Pro,if anyone is familiar with it. I am to make it follow basic ...

  1. #1
    Unregistered
    Guest

    Robot programming

    I am to program a robot, the TJ-Pro,if anyone is familiar with it. I am to make it follow basic instructions like move forward, turn right, left ,stop, but I don't know much on C
    I am somewhat familiar with C++ and need help getting started
    any suggestions will be greatly appreciated.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,532
    Can we assume that you've read the robot manual?

    Is this a robot which is controlled from the PC, or merely programmed by the PC (so it can then roam freely)?

    Bunch of other stuff like which OS/Compiler/external interfaces used etc.

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    Is it blue or red?

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    I don't think that's the point. He's asking for the differences between C and C++. The major difference that will make you alter your style - C is not object-orientated, at least not as much as C++ is. You'll have to stop using classes (I don't know about unions and structs) inheritance, andthings like that. It's a little like lower level languages that way. Also, there's different functions (the reason for this also stems off of the lack of object-orinetation). You'll use sdtio instead of iostream, and things like that. Not that different. You'll be able to find a lot of books made just for people who know one, but not the other. I recommend Borland. They're good.

  5. #5
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    I also have a question on the subject of my own. I've seen little machines and systems where you can type in code, and it puts it into a stand-alone, PC-free piece of hardware. I assume it's using programmable microcode or microchips or something (probably the first). Anyone know any details on how to get these and what they're useful for?

  6. #6
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    I think he has C-code provided with the robot, but he only knows some C++. Unregistered, I advice you to read the manuals of the software as provided with the robot. It usually contains an overview of which functions you can use, it usually also contains guides on how to setup the robot.

    To Sean:
    Not really certain what you mean. But you can download software into a device, if interfaces are available ofcourse. For example, you write software for a certain device on your PC. Then use a cross compiler to compile the code to binary for that certain device. Then you download the binary code into device and let the device go running. With things like logic analyzers and perhaps a terminal you can check if things go right.

    Note that the binary probably won't run on your PC. The cross compiler generates executable code especially for the specific device you're writing software for. However, sometimes there are simulators for PC on which you can run the software.

  7. #7
    Unregistered
    Guest

    robot programming

    I do not have a manual so that makes this harder. The Tj-Pro robot is controlled by a 68HC11 microprocessor. I am using the ICC11 compiler to load the machine language, but I am to develop the program in C language. I just don't know how to get started I can get it to do a 360 turn and that is about it.
    maybe now yall can help me.

  8. #8
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,532
    > I do not have a manual so that makes this harder
    No, it makes it impossible
    Oh look what google turned up
    http://www.mekatronix.com/detailed/tjpro.htm

    Whoever assigned you this task should either have provided you with this information, or told you where to look

  9. #9
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    Mm that was pretty interesting reading even if I don't have the robot

  10. #10
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    In response to Shiro - would you need a different compiler for every diffferent machine? And how does the macjhine store the information and code?

  11. #11
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >would you need a different compiler for every diffferent machine?

    A compiler creates executable code (binaries) for a certain processor architecture, like 8086, 8051, M68000, SH4 or some other architecture. Since these architectures are different to each other, you will need a compiler for each architecture. Code compiled for a M68000 won't run on a 8086, so you would need a compiler to compile to code to 8086 binaries.

    >And how does the macjhine store the information and code?

    When you have created the binaries for a device, you download it into the device. It is usually stored on an EPROM or such like that. When starting up the device, it jumps to the first address of executable code and your software is going to run. Temporary information can be stored in a RAM module or some other memory module for temporary information storing purposes. I don't know how to call that in English, non-valitile memory?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Continuous Navigation while X for a Robot
    By Creighton in forum C Programming
    Replies: 3
    Last Post: 06-29-2009, 08:38 PM
  2. Help! Robot Programming
    By Gizzle in forum C Programming
    Replies: 23
    Last Post: 09-28-2006, 07:32 AM
  3. Help with moving robot in a maze
    By Killahkode in forum C Programming
    Replies: 2
    Last Post: 09-25-2006, 10:51 AM
  4. I, Robot -- It's a trick, and I'm mad.
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 07-15-2004, 01:57 PM
  5. Replies: 5
    Last Post: 09-08-2001, 09:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21