Go Down

Topic: Learning arduino programming  (Read 259 times) previous topic - next topic

Vaibhav2710

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








Thank you
Hi there this is vaibhav new to arduino. If I make any mistake i request you to forgive me

AWOL

You won't know until you've finished
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

Robin2

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
Two or three hours spent thinking and reading documentation solves most programming problems.

larryd

No technical PMs.
The last thing you did is where you should start looking.

pert

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:
https://github.com/arduino/Arduino/wiki/Build-Process

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++.

Robin2

#5
Mar 21, 2019, 09:59 am Last Edit: Mar 21, 2019, 10:00 am by Robin2
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
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up