Society of Robots - Robot Forum
Software => Software => Topic started by: huffdev on December 19, 2010, 03:02:10 AM
-
Idk where to start which programming language in c I understand you can do VPL And motion programming but i still want to learn one of those programming languages so i can use those to.
-
For robots, learn C first. For OOP, learn C++ (and if you don't know what OOP is, learn C). Unless you have to, don't use C#. (The last is a personal opinion).
-
start with c go to c++ then java and c# if you want to expand your programing skills
-
thanks guys!
-
yup. i would agree.
C is the parent language.
you will find a C compiler for just about any processor on the market.
C is your best starting point.
C++ is an extension of C so anything you learn from C will be directly usable if you ever go on to C++.
a C++ compiler will compile C code so if you can program C you will feel fairly at home using a C++ compiler. (there are some small changes in the standard but the code should still compile with some warnings.)
full C++ implementations are not as common on small embedded platforms as C.
many of the extensions that C++ brings are to do with complex data structures which are typically not required on CPUs with a very small amount of memory.
C# started life as a vendor specific (microsoft) implementation of C++ so C is again the obvious starting point.
you will not find a C# implementation for many of the CPUs in use in robotics.
there are a few C# embedded implementations but they tend to be more expensive and less efficient as C# was never conceived with memory efficiency in mind.
that being said, C# is a good platform for full computers where memory and CPU constraints are not such an issue.
in my opinion which language is not that important when you are first starting out.
more important is picking a whole development environment that has good support with lots of online examples.
good libraries (pre-written code sections) for your choice will greatly speed up the development time of your projects.
if you want a versatile place to start then look into the GCC AVR port. this involves C programing on the Atmel AVR but as you are using GCC your knowledge will be portable to 1000s of different platforms (including PCs).
this website's "50$ robot" project is a good place to start.
if you want an easy place to start, look into the Arduino platform.
it's programming environment is based on C but they hold you hand through the hard parts and provide you with a ready to go platform at the expense of being tied to limited hardware.
dunk.
-
I am in agreement with all the above posts. Learn C first.
Also the best book and well worth the price is:
The C Programming Language by Brian Kernighan and Dennis Ritchie.
http://en.wikipedia.org/wiki/The_C_Programming_Language_(book) (http://en.wikipedia.org/wiki/The_C_Programming_Language_(book))
http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628 (http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628)