Society of Robots - Robot Forum

Software => Software => Topic started by: Jed on July 01, 2009, 02:39:39 AM

Title: C language
Post by: Jed on July 01, 2009, 02:39:39 AM
Does anyone know websites or means of learning C language? 
Title: Re: C language
Post by: SmAsH on July 01, 2009, 03:05:12 AM
one of the best ways of learning programming is to start off using other peoples code, learn what each line does, commands etc... and then venture onto modifying the code to do different things... and then eventually go onto making your own code. there are books out there, and free sites like this one http://www.cprogramming.com/tutorial/c/lesson1.html (http://www.cprogramming.com/tutorial/c/lesson1.html)
Title: Re: C language
Post by: GearMotion on July 01, 2009, 07:11:40 AM
Does anyone know websites or means of learning C language?  

You might want to look into all of the "Arduino" stuff. This is C with microcontroller libraries using a free development environment. There is a lot of beginner information about Arduino that you can find on the web.
Title: Re: C language
Post by: jamort on July 01, 2009, 07:29:39 AM
the main thing to worry about with robotics in c for now would be learning all the loops and if statements some of the really simple stuff...
really in the matter of a weeks or two you should be able to program stuff on robots
Title: Re: C language
Post by: kpmcgurk on July 04, 2009, 11:46:25 AM
I have to disagree with that a little. Although you should know all of the loops and such, it is hardest to learn  how to do all the initializations for ports and A2d/pull up resistors. I have found very brief tutorials on these kind of things, so it was hard to learn(mostly confusing). (and I don't want to pay 100 bucks for an AVR book when I have the internet to use ;) )

I may offer a bit of a different perspective on this one, as i started with computer programming before robotics, and the loops and such I already knew before robot programming.


anyway just my opinion
-Kpmcgurk

Title: Re: C language
Post by: sonictj on July 04, 2009, 12:03:42 PM
Quote
You might want to look into all of the "Arduino" stuff. This is C with microcontroller libraries using a free development environment. There is a lot of beginner information about Arduino that you can find on the web.

That is not entirely true Arduino is a great resource but the language is primarily c++.  Arduino has a ton of library's consisting of classes that are incompatible with the C language.  GearMotion is right, you can learn a ton from their code just realize some of it won't work with standard C.  C and C++ are very similar except for c++'s object oriented programming (classes etc.).
Title: Re: C language
Post by: SmAsH on July 04, 2009, 04:05:39 PM
well, i have one more thing to add.
The best way to learn in practical, by actually doing it you learn it and how it works better.
well, this isn't the "best" way to remember things, the best is to teach someone else but its close enough...