I want to learn to program robots with C?

Home » Programming & Design » I want to learn to program robots with C?
Programming & Design No Comments

I know I need C programming language for robots. I'm planning to learn C by myself. But my question is, can I just pick up any random C book (e.g C for dummies) and get started? Or are there specific books for C and Robotics?

Also where can I download the C software? I'm using Windows 10.

Other answer:

I think the best way to start is to get a kit and some sample programs, and start playing with those. Arduino systems are used quite a bit in amateur robotics and use a dialect of C as their main programming language.

You'll eventually need all the formal training or self-training that some other posts are suggesting, if you are going to build your own robotic system from scratch with custom hardware and software. That's not happening next week, though, and probably not in the next year or two.

Find something that already works, and learn about how and why it works.

The tutorial sites on plain C programming are good to help you find out if you have any desire to do C programming, and will help you understand sample programs. It's also nice to be able to write test code and simulations to verify that the output of a subroutine is going to be valid–before feeding that output to hardware that might be damaged by the wrong set of instructions.

C is just a language, so any book or internet instructions will do. Like any language, you learn the vocabulary and the sentence structure (syntax) so that you can write instructions to be carried out. As with any language, there are multiple ways to say the same thing and you will learn better, more efficient ways to get the job done, where in the beginning you might take 50 lines to do a task but eventually figure out how to do it in 10, while also learning to organize your commands in a neat and easy to understand format with notes/comments that will make it easy for you to understand what you did if you have to go back later to make some tweaks. While you certainly can buy books on the subject, you can also learn everything you need for free off the internet. My favorite source is YouTube so that I can watch videos of the code being written and ran.
First, learn C. Then, apply it when learning robotics.

I found this C book online. It's a classic, but a bit outdated:

A list of reference books is found at

You can find several of these books in torrents. Start by The Pirate Bay.

GCC is a famous C compiler. It can be found, or installed, at most Linux distributions, and in Windows via MinGW. You will need it. Also install gdb (a debugger) and make (compilation assistant). If you want an IDE (Integrated Development Environment), a mix of editor, compiler and debugger, Code::Blocks is free.


Your first goal is to learn the basics of C without focusing on what you are going to do with it.

That's assuming you haven't learned a substantial amount of another programming language. If you've done that, then you can go straight to a book that covers programming robots — but you probably should focus on a specific brand of robot.

You can look at these C tutorials:

I think if you download IDE: http://www.codeblocks.org/
it comes with C and C++, but I'm not sure