It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

Programming robots & embedded design.

page: 1
0

log in

join
share:

posted on Jun, 12 2007 @ 09:57 PM
link   
I was wondering if there are any programmers here, who work/hobby in the area of robotics or embedded systems.

If so, what language do you use and why?

(I have been working with microcontrollers using the PIC and picbasic pro, but looking into interfacing my projects to a PC or the internet for remote controlling/communicating with my microcontroller project. So looking into learning Java.)

[edit on 12-6-2007 by Electro38]



posted on Jun, 12 2007 @ 10:15 PM
link   
I am teaching introductory robotics classes in elementary schools this summer. I use the BASIC Stamp, which is widely used in hobbyist kits and can do all sorts of stuff. Haven't used Java at all, and I haven't done much at all with the BASIC Stamp, so I'm not sure of the full range of capabilities. The Lego robots also use the same processor and if you google for Lego robots, you can get a better idea of what the language is able to do.

Haven't done Pic. I have done some assembler code (the classic way of doing it) and blown it into eproms, but that was 25 years ago. I surely hope things have changed by now.



posted on Jun, 13 2007 @ 03:19 AM
link   
I've used a Motorola 68000 series (I forget the exact model #, 68030 or something) and a PIC that was, if I recall, in the 18F-something or other series. The PIC is useful mostly because it's dirt cheap, but I really hated using it. It doesn't have a lot of memory, and it has ONE temporary memory address, which makes some things very annoying. (I forget the correct term, but UGH! ONE??? WTF???) I also didn't like the limited instruction set, although in theory if you are smart enough this shouldn't be a problem. I ended up downloading some pre-written functions for things like manipulating strings and polling for inputs from a PC, which I was connected to with a serial port.

The Motorola was a great chip, but it's expensive, or so I'm told. I didn't have to pay for the one I used, since it was part of a school course. It's got lots of memory, and something like 16 temporary memory addresses, 8 of which are intended to store addresses and 8 of which to store data (A0-A7 and D0-D7) but you can put anything in them. The Motorola had a much larger instruction set, and there was nearly always an instruction for whatever I wanted to do. (As opposed to a PIC that doesn't even have a multiply or divide instruction :p) I didn't have to download any pre-written stuff for a motorola; I could figure it out myself.

I haven't used any other microcontrollers, but I have heard very good things about a chip that a local company here makes. I forget the name of the chip, but the company is called Eleven Engineering. It's main attraction is that it can do parallel processing. They're not that large a company, but they've worked with some big names, and contributed to projects like the Sony Playstation. Only thing I have against them is they wouldn't give me a job when I applied



posted on Jun, 13 2007 @ 07:15 AM
link   
Now that you mention it, Dragon, that was a Motorola chip I was working on in the early 1980's. It really was a superior chip, but at the time our options were fairly limited.

Motorola had (and still may have) the largest instruction set, making it easier to program at the machine code and assembler level. But coding at that level is agonizing! I've done it and I thought it was gonna turn my hair gray!

Check around for robotics forums and ask what folks like. Describe what you want the robot to do, because some chips are better at some functions than others.



posted on Jun, 13 2007 @ 08:38 AM
link   
Thanks for the input.

(I've been using the PIC and picbasic pro which is working out nice.)

I guess my question really should have been what prog. lang. to use with the PC to communicate with a micro.

I've looked at VB 2005 (.NET), Python and Java. I'm not a programmer, these were just initial glances into learning these langs.

Python seemed really easy and I like the GUI of the VB.NET visual studio. Bu, it seems that most of the examples, books and docs pertaining to connecting PC to a micro are in Java.





[edit on 13-6-2007 by Electro38]



posted on Jun, 13 2007 @ 01:46 PM
link   
I haven't seen VBasic used for robots, but that's just because of the chips I'm using. I've heard of Java being used for it, but many of the web pages I see indicate that a lot of the programmers are using assembler.

I did find a page that talks about Java Media Framework, but I think that may be for cameras only:
www.cs.cmu.edu...



[edit on 13-6-2007 by Byrd]



posted on Jun, 13 2007 @ 02:37 PM
link   
You should give Johnsky a shout, he knows buttloads about this stuff.

[edit on 13-6-2007 by sardion2000]



posted on Jun, 13 2007 @ 03:21 PM
link   
For embedded stuff, we generally use C.

There are generally bits and pieces you have to do in assembler. I try to limit that (and corral it into one file set) so that those who follow after me don't have to learn the assembler for that part.

The C compilers have gotten to be pretty good. In general, I post-analyze the code output by dumping out the c-assy listing and seeing what's really nasty looking. Sometimes you can just rephrase it in a way the compiler likes better, but at times you just can't get it to do what you'd like and then it's an assembler function.

We've done a couple of projects in C++ but there's generally a lot of run-time resolution overhead that eats up ram. If you've got it to spare then objects are a nice way to make the program more maintainable.

I've seen Java used too, we don't here.

Generally speaking, we have to do what works in Tornado.



posted on Jun, 13 2007 @ 03:28 PM
link   
Try looking into Prolog and LISP. They're both languages for describing embedded artificial intelligence... we used them in conjunction with assembler in my microelectronics programming class in college. They're both very high level languages, so if you already know object oriented programming the learning curv is not so bad.

wiki: LISP
wiki: Prolog



posted on Jun, 13 2007 @ 04:04 PM
link   

Originally posted by bokinsmowl
Try looking into Prolog and LISP. They're both languages for describing embedded artificial intelligence... we used them in conjunction with assembler in my microelectronics programming class in college. They're both very high level languages, so if you already know object oriented programming the learning curv is not so bad.

wiki: LISP
wiki: Prolog


Aren't they both interpreted? I'm not sure either one is really appropriate for small embedded projects where you're generally running small task oriented programs. They're great for AI, I know my CAD programs are secretly written in some LISP dialect but I wouldn't have considered them for running a com port.

On the other hand, if you want a weird interpreted embedded language, we have used Forth a couple of times long ago.

Forth generally compiles smaller than assembler. You have to take drugs before programming in it though.



posted on Jun, 13 2007 @ 08:13 PM
link   
I think usually C or C++ is used for this sort of thing. When I used the PIC, I just wrote it straight in assembler on a PC in whatever the equivalent of Linux's notepad is, and then transferred it to the PIC. I would have had to relearn half of C at the time, so I figured it wouldn't be any more effort to learn PIC than to relearn C. I've also seen reference to VBasic being used for this, as well. I've never heard of Java being used for it, but I don't see any reason why that wouldn't work, either. Probably just go with whatever you know best, and if you don't know any of them, go with C/C++, because it is more useful to potential employers and stuff like that.



posted on Jun, 15 2007 @ 12:51 PM
link   
Thanks for the input and info. I decided to start studying Java, because my ultimate goal is to connect my microcontroller projects to the internet.

I was thinking about C, since it is used a lot in embedded systems, but Java seems more suited for web programming, and the added benefit of it being used as well in embedded systems.

Thanks again.




top topics



 
0

log in

join