Author Options:

I heard that arduino is based on C if I learn C++ will I still be able to program an arduino? Answered

Picture of

The title basically says it all If I learn C++ will I still be able to program an arduino or should I learn C first. The creator of C++ said to just learn C++ before C but other things say to just learn C before C++. I really just have to learn how to program an arduino but I still want to pick up one (or both) of these languages. I have an arduino and the book below. thank you

3 Replies

aarone (author)2009-06-24

I would avoid C++ as a path to learning programming on the Arduino. Like Kelseymh said, you'll become reliant and familiar with parts of C++ that don't exist in regular C. In situations where you want to program applications and utilities for computers learning C would probably just take time. Because you want to program for the Arduino though, you're better off learning C, and then, if you want to expand out to other types of programming, you can look into C++. C has been around a long time. You can probably find several books on it in your public library.

Select as Best AnswerUndo Best Answer

kiss my donkey (author)aarone2009-06-25

So really I just need to learn C and I'll be fine?

Select as Best AnswerUndo Best Answer

kelseymh (author)2009-06-24

If you want to learn Arduino programming, then learn C.

C++ is a nearly-proper superset of C. Any valid C code will compile, link, and run using current C++ compilers.

If you learn C++ "first", then you'll find yourself trying to use C++ constructs (comments, class declarations, polymorphism) which just won't work with the Arduino.

Select as Best AnswerUndo Best Answer