Maker Pro
Maker Pro

How to Learn Programing W/ Arduino?

Jaderman

Dec 12, 2009
32
Joined
Dec 12, 2009
Messages
32
Hi,
I'm a bit new to Arduino and I was wondering if anyone out there would know where I could find tutorials on how to learn how to program with Arduino.

Thanks
 

AndreeU17

Apr 23, 2014
42
Joined
Apr 23, 2014
Messages
42
Hi,
I'm a bit new to Arduino and I was wondering if anyone out there would know where I could find tutorials on how to learn how to program with Arduino.
Thanks

The programming language for arduino is C! I suggest getting some books about C and going over the language! It will benefit you 100% not just in an Arduino but everything electronics!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Actually, the language is C++, and googling "arduino tutorial" should bury you in alternatives. I'd probably start with things from the arduino.cc site, but there are plenty of options.

I'm not sure that learning C (or C++) will be a benefit for *everything* in electronics, but it is a useful skill to have. Beware that C/C++ assume you know what you're doing and often provide little warning that you're about to do something stupid.
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Could always use assembly ;)
Just kidding... it is a very low level programming language. You get an infinite amount of control, but your language is very primitive and can be hard to pick up.
Using C or C++ languages make it easier to read and write for, but may introduce additional bloat in your final code.
Go take a look at the arduino website as they have lots of tutorials, and Lady Ada over at adafruit has a reasonable 'learning' section to pick up some arduino skills.
 

AndreeU17

Apr 23, 2014
42
Joined
Apr 23, 2014
Messages
42
Actually, the language is C++, and googling "arduino tutorial" should bury you in alternatives. I'd probably start with things from the arduino.cc site, but there are plenty of options.

I'm not sure that learning C (or C++) will be a benefit for *everything* in electronics, but it is a useful skill to have. Beware that C/C++ assume you know what you're doing and often provide little warning that you're about to do something stupid.

I know that Arduino application (IDE) is written in C++, but the actual code that runs Arduino is in C. Yes you can use libraries that allow you to use other languages but the default language for Arduino is C. As we'll as knowing them, we'll they both benefit extremely because they provide a better level of construction with both application and hardware, etc. I know other languages such as ASSEMBLY, BASIC are prominent for hardware but C/C++ is recommended in this time and age! Now this is all opinion and from what I've delve with from those who are already professional! So if it's wrong, correct me cause I want to know the right answer obviously !!!
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
http://forum.arduino.cc/index.php/topic,45492.0.html
There are some questions that have been asked / answered already.
I have nothing against EP, but some answers are better searched for in forums that specialize in the topic ;)
That said, this is a great online community that will assist in getting you answers rather than the large amount of fly-by posters that don't read the thread that you will never see again on larger forums ;)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
No, you can use C++ constructs in the code you write to run on the arduino.

Believe me, many libraries are written as classes.

The Arduino environment shields you from having to write header files (unless you're writing a library) and doesn't provide the standard C++ libraries, but the compiler is a standard C++ compiler and will accept standard C++ constructs. In my mind this makes it more C++ than not. C++ without the standard C++ libraries does NOT make it C.

Of course the AVR microcontroller doesn't understand C or C++, it's the compiler that converts the source code to the machine code that the microcontroller natively understands.

The argument that you shouldn't avail yourself of all the C++ features because they're hard for the microcontroller to do is not an argument that the compiler isn't C++.

Arduino sketches are written in C++.

A typical construct you'll encounter in the examples is

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

That's C++ not C.

If you are merely using existing libraries, you'll mostly use features in the C subset of C++. If you are interested in writing libraries, then a real understanding of C++ specific features like classes are a must, as in the LiquidCrystal example above.

As sketches are written in C++, I recommend a C++ book. There are subtle differences between C and the C subset of C++ that you really don't want to know about. In addition the more advanced features of C++ would be covered too if you need them.
(from here)
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hi,
I'm a bit new to Arduino and I was wondering if anyone out there would know where I could find tutorials on how to learn how to program with Arduino.

Thanks
Jaderman, I have not seen a response from you in here yet and am hoping that some of the supplied information is useful to you.
Please keep in mind that there is a diverse collection of members on this site who can help if you have a specific questions or problem.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The off-topic posts have been moved here.
 
Top