Learning arduino programming

I want to know how much time it will take to learn arduino programming after learning C language.

Thank you

You won't know until you've finished

Vaibhav2710:
I want to know how much time it will take to learn arduino programming after learning C language.

The Arduino is programmed in C/C++ so your knowledge should get you going quickly. Study the example programs that come with the Arduino IDE.

If you have been learning C programming on a PC the big change will be the different mindset needed to program a microcontroller with no operating system and very little memory. That change has little or nothing to do with the choice of programming language.

...R

3 weeks

I think the main challenge would be learning the differences between C++ and C. You can get by without a very in depth knowledge of C++, but you will probably be a bit confused if you try to look at Arduino code you find as pure C.

After that, you will need to understand the sketch preprocessing that the Arduino IDE does to turn the sketch into valid C++:

  • Concatenate all .ino files in the sketch, in the order they are shown in the Arduino IDE.
  • Add #include <Arduino.h> to the top of the sketch, if the sketch doesn't already contain an #include directive for that file. Arduino.h brings in all the standard Arduino API definitions (e.g. digitalWrite(), byte, HIGH, LOW).
  • Generate function prototypes for any function in the .ino files that doesn't already have a prototype.
  • Add #line directives so that the compilation output will match the original sketch files.
  • Add .cpp to the file name and compile it as C++

Details here:

After that, it's only a matter of getting familiar with the standard Arduino API. That's simple once you understand the fundamentals of C++.

larryd:
3 weeks

I reckon if you start with the examples in the Arduino IDE you will be able to have something working within 3 hours.

How long it takes to become an expert is another matter entirely.

Do you need to become an expert?

...R