I’m currently oversea’s working. However I am going to be gettig into robotics once I get back home to the UK. However I was just wondering what would be the best programming language to learn for PC control of Robots.
I know that I will have to freshen up on C programming and learn assembly and possibly flowcode for programming microprocessors. However for PC software I dunno wheather to go for .net products or learn JAVA. As I know that there are a few books avalible for programming robots with JAVA.
Also one last thing my forst robot will be the BOEBOT however should I stick with the Basic Stamp or stick a porpellor chip on it, or maybe change the chip once I have gotten the hang of the Basic Stamp.
If you want to leverage the Lynxmotion products and community, then I agree with Drew - stick with the Atoms, which are usually programmed in BASIC (C is supported, but everyone seems to be using BASIC). I’m sticking with Atoms and have no regrets.
There are other options that may be just as valid for you, but I think the Lynxmotion stuff is a great starting point if you are new to the hobby.
I’m not really sure what constitutes a huge amount of support, but I would put the Lynxmotion support for the Atoms up against any other microcontroller, including the Basic STAMPs, any day of the week and be confident Lynxmotion would be most likely to win, or at least tie.
I never once regretted starting out with the Basic Atom and then moving to the Atom PRO. The Basic STAMP just didn’t have what I wanted speed wise or feature wise, sorry. I say this having take a serious look at the Basic STAMP before deciding to go with the Atom chips.
As for support of the Atoms, there is plenty of that right here from many users as well as Lynxmotion staff.
I don’t think there’s anything wrong with either PC based solution you mention. Java is cheaper and more portable (and there are even some Java based stamps if that appeals).
.NET also has the Robotics Studio available. There have been a good many articles on it in Robot (and possibly Servo) magazines, and it does look very promising (especially with the robot simulation).
Between the two, its really down to personal preference.
For the embedded control, starting with a basic stamp is a good idea. As has been said, the support for the Atom here is excellent. Also, most code samples you’ll find are in basic, so at the very least, a passing familiarity with the language is very useful, even if you wish to move to another language or even a completely different architecture eventually.
C is supported? Where is that? While I totally agree with the recommendations to use BASIC, I’m constantly working in C (and with PICs), and the processors I propose to put on a 'bot would then be supported by C.
I do have PIC BASIC Pro; could that and a board with an '877 family processor run the BASIC generated by PowerPod? I hear the Atom uses the '876, and that PBP is similar to Stamp BASIC. (a lot of assumptions there).
With the AtomPro IDE, click Project->New Project. One of the options is C/C++.
There is currently no library for it that I’m aware of that will provide some of the funtionality of basic (PWM, I2C, etc), so you do need to dig into the chip manuals and write them yourself.
BASIC is just that - basic. It’s about a half-step above pseudocode, so if you can accurately describe what you want your program to do at each individual step of the process, converting it to BASIC is a fairly simple process.
Of course, the same can be said of most other languages - if you can’t go from describing the steps of your program to individual commands, then you haven’t broken the process down far enough.
C/C++ and BASIC are completely different languages, so learning one will not necessarily make learning the other any easier. Learning BASIC first might make learning to program in other languages a bit easier, but you can’t translate much more than algorithms between two such different languages. C/C++ tends to be much more standardized, although there are additions each compiler maker has done that they believe make it easier to use and program with. The truth is, these additions are really written in C/C++ also and are mostly libraries to be linked with your code that make using specific hardware easier.
That’s just my take on the two languages, having programmed in both and converted code from BASIC to C.
Actually, I’d guess that after C++, you will find BASIC a lot easier – not because of similarities between the languages, but because you will be used to “thinking like a programmer”. You will already have a foundation in thinking logically, building a program up from submodules, and the basic processes involved in writing a program in any language.
A lot of the difficulty in learning to program comes from learning to adapt your way of thinking, to be able to parse your thoughts into a form that a computer will understand. Once you’ve gotten over that major hurdle, it’s mostly just a question of applying those processes to the particular language you are using.
Learning to talk is hard.
After that, learning a new language is just a question of adaptation of what you already know.
It’s best you start programming the micro controller in BASIC. Since you will already have “high level” instructions to program your robot. The BASIC interpreter will do all the heavy work for you.
If you use C/C++ you will have more control over your hardware, but also lot more work to get the same functionality the BASIC already offers.
I went to a science exposition, and ended up talking for about two hours to a french guy that was almost done with his post-doctorat (realy advance ) And he realy pushed me to start C++ because he said after that, C was pretty easy to convert, and Basic is pretty easy so it will be easier to go that wasy than the other.
I myself started on a Basic Stamp II and agree with spacejunk. There is HUGE support for the beginner to learn several programming concepts. The books are everywhere, code examples all over the internet, and countless articles with examples in several publications.
There are advantages and disadvantages between the atom and the stamp. One has to decide for them self what’s the best fit for their situation. Do you want support, examples, simplicity? then I recommend the stamp for the raw beginner. Do you want power, large code space, and speed? then the Atom is the better fit.
Having used both, I found it easier to learn off the stamp than the Atom line of MCUs because of the many articles and code examples available. If one decides to migrate from the stamp to the Atom, the code is 99% compatible and the learning curve is minor.
There are some very big differences between both MCUs
The Atom has more program space and much faster
The Stamp uses 8 - 2k program slots that need to be called if your program is to big to fit in one slot. What’s nice about this though is you can name your slots and consider them program modules which keeps things very organized.