C/C++ Course Specifically for Arduino programming

Does anyone know of a course specifically for programming C/C++ for Arduino.

It just seems like the courses focus on C/C++ have a ton of stuff in them that is completely irrelevant to the arduino.

It also seems like arduino-focused courses start with a few of the programming basics and then jump right into focusing on relays and LEDs and completely ignore the fundamental programming part of it.

Considering these boards are sold by the millions, there HAS to be someone out there teaching a C for Arduino course, right?

mudmin:
Does anyone know of a course specifically for programming C/C++ for Arduino.

It just seems like the courses focus on C/C++ have a ton of stuff in them that is completely irrelevant to the arduino.

It also seems like arduino-focused courses start with a few of the programming basics and then jump right into focusing on relays and LEDs and completely ignore the fundamental programming part of it.

Considering these boards are sold by the millions, there HAS to be someone out there teaching a C for Arduino course, right?

How have you determined your statements? Have you taken the courses you disparage? Did you begin reading world history books in the first grade? All the C/C++ stuff is relevant to programming the Arduino. Perhaps you need to do more Arduino programming to discover the connection to all C/C++.

Paul

Paul_KD7HB:
How have you determined your statements? Have you taken the courses you disparage? Did you begin reading world history books in the first grade? All the C/C++ stuff is relevant to programming the Arduino. Perhaps you need to do more Arduino programming to discover the connection to all C/C++.

Paul

I didn't disparage anyone or anything. I just keep getting answers like "well it's a subset of c or c++."

The basic language is full C, only the standard library is a subset, i.e., no stdout or stderr.

mudmin:
Does anyone know of a course specifically for programming C/C++ for Arduino.

I think a distinction can be made between learning C/C++ and learning to program an Arduino. All of the Arduino code is C/C++ but not all of the full scope of C/C++ is relevant to an Arduino. The amount of C/C++ that is essential for Arduino programming is probably quite small.

You have not told us what style of learning works for you - whether you prefer a text-book style or a "suck-it-and-see" style.

I like to look at examples (and there are plenty with the Arduino IDE) and then if I see something I don't understand I can spend some time with Google, etc. learning about it.

I suspect there is no shortage of online tutorials for Arduino programming and for C/C++ programming.

The advantage of the examples is that it brings you in contact with the things that are specific to the Arduino at an early stage. And (for obvious reasons) they do not involve irrelevant C/C++ stuff. However I am not saying that the examples illustrate best-practice C/C++ coding. Many of them fall short of that. But they get the job done.

...R

I know for a fact there are a lot of intro C programming books aimed specifically at the Arduino family.

Robin2:
I suspect there is no shortage of online tutorials for Arduino programming and for C/C++ programming.

The advantage of the examples is that it brings you in contact with the things that are specific to the Arduino at an early stage. And (for obvious reasons) they do not involve irrelevant C/C++ stuff.

I appreciate the idea of the examples. That's what I generally wind up doing. It usually winds up that I'm trying to extend the example and I'm having issues with the data not being in the variable type/format that the next thing I'm trying to do needs.

I will say that this thread is a pretty typical example of the frustration of the arduino community. Other than you, I just get lots of "there's plenty of them." Tons of books. Tons of courses. Yet not a link or even the name of one when that's clearly what I'm asking for.

I truly appreciate everyone's time...I just think that this is a huge thing that's lacking in the arduino community.

mudmin:
I just get lots of "there's plenty of them." Tons of books. Tons of courses. Yet not a link or even the name of one when that's clearly what I'm asking for.

Yep, we are remiss in not doing that for you. I just googled "beginning C for Arduino" and got 1.4 million hits. Give me a couple of days to cull that list for you since you can't find any links.

mudmin:
I will say that this thread is a pretty typical example of the frustration of the arduino community. Other than you, I just get lots of "there's plenty of them." Tons of books. Tons of courses. Yet not a link or even the name of one when that's clearly what I'm asking for.

I don't know whether I am typical of the more frequent posters here but I have read none of the books and I don't think I went through any of the tutorials.

I have been doing hobby programming for 35 years or so and I knew enough when I got my first Arduino so that I did not need them. I do have books on Ruby, Javascript, HTML and CSS. But I guess if I was starting those things now I probably would not buy them - just learn from the internet. For example when I switched (reluctantly) from Ruby to Python I did not buy a Python book.

Strange as it may seem you are more likely to get good advice about learning materials from other beginners. But, as far as I can see, they don't bother using the Forum once their own question has been answered.

...R

econjack:
Yep, we are remiss in not doing that for you. I just googled "beginning C for Arduino" and got 1.4 million hits. Give me a couple of days to cull that list for you since you can't find any links.

Yep because there's a book by that title. If you get to page 9 there's a single link for the Adafruit learning system, which isn't a c course either. Not one course.

Nevermind. This is really unproductive. Thanks for those who tried to be helpful.

I have noticed the same thing as OP regarding Arduino-centric resources. They usually stick to code that's very simple from the C/C++ perspective, and focus on interacting with hardware and using libraries to do stuff - all very practical information, but you're not going to learn anything other than basic c/c++ from those sort of resources. They always seem more focused on the hardware than the software.

Meanwhile, books dedicated to C/C++ assume you're programming on a desktop PC, so the sort of patterns they use as examples aren't always good ideas when programming in an embedded environment, and they don't emphasize the parts of the language most relevant to embedded programming.

I tried to find a resource that bridged the gap last year and wasn't happy with anything I found... I frankly haven't been able to find any resources printed on dead trees that I found particularly useful for arduino programming.

Hi,

I just googled "beginning C for Arduino" and got 1.4 million hits.

Yep because there's a book by that title.

So there is. HERE it is on Amazon.

This book uses Arduino/IDE for all the examples, but it goes in depth with C, beyond other books I have.

I worked with the author on this book and I have run all the examples. I think it is good for both Arduino programming and hardware insights.

DISCLAIMER: I am the Technical Editor of this book.

terryking228:
Hi,
So there is. HERE it is on Amazon.

This book uses Arduino/IDE for all the examples, but it goes in depth with C, beyond other books I have.

I worked with the author on this book and I have run all the examples. I think it is good for both Arduino programming and hardware insights.

DISCLAIMER: I am the Technical Editor of this book.

I may just go with the book. I appreciate it!

DrAzzy:
I have noticed the same thing as OP regarding Arduino-centric resources. They usually stick to code that's very simple from the C/C++ perspective, and focus on interacting with hardware and using libraries to do stuff - all very practical information, but you're not going to learn anything other than basic c/c++ from those sort of resources. They always seem more focused on the hardware than the software.

Meanwhile, books dedicated to C/C++ assume you're programming on a desktop PC, so the sort of patterns they use as examples aren't always good ideas when programming in an embedded environment, and they don't emphasize the parts of the language most relevant to embedded programming.

I tried to find a resource that bridged the gap last year and wasn't happy with anything I found... I frankly haven't been able to find any resources printed on dead trees that I found particularly useful for arduino programming.

DrAzzy:
Meanwhile, books dedicated to C/C++ assume you're programming on a desktop PC, so the sort of patterns they use as examples aren't always good ideas when programming in an embedded environment, and they don't emphasize the parts of the language most relevant to embedded programming.

I tried to find a resource that bridged the gap last year and wasn't happy with anything I found... I frankly haven't been able to find any resources printed on dead trees that I found particularly useful for arduino programming.

This is EXACTLY what I'm saying. Maybe I'll learn this stuff and then do an online course. I'm getting there. It's just way harder than I think it should be.

So there is. HERE it is on Amazon.

I also got Pro Arduino When I got the ATTiny

Try udemy.com

Why is the book called "C" and not "C++"?

@Edie: The book is specifically written for the person with absolutely no programming experience and concentrates on the Arduino version of C (e.g., no double data type). The second edition edition has a chapter at the end of the book titled A Gentle Introduction to Object Oriented Programming and C++. There is no way to teach C++ in one chapter, but it slants the narrative to understanding why most Arduino libraries are written in C++ and how to understand the syntax used in those libraries.

A good way to judge the book's effectiveness is to read its reviews. I am totally biased towards the book since I am the author. Terry, who commented earlier, made notable improvements in the book, which is one reason I encourage people to make sure they get the 2nd edition.

There are various Youtube and other resources available for learning C/C++ programming in Arduino like ones made available by Derek Banas, Programming Electronics Academy and the Arduino Class
You can get books as well for learning C/C++ programming if you learn better through texts.
I think people have already mentioned them in the comments.
Peace.

A really good video tutorial series is Paul McWhorter, He worked as a EE at Sandia and retired to teach high school engineering and science in texas. This is remake of his first try at the online tutorial. It requires a intro to
arduino kit, specifically the Elegoo super kit. He is on "Arduino tutorial 59: " The course designed for someone with only algebra I, for x = x + 1, he can explain electronics, programming, arduino to the man on the street. I am not kidding he goes slow enough and uses the arduino and components in the kit for a general high school
into to computers course. C is a fine grain language that strongly typed, an 1970's structured language, wierd feature called a pointer difficult to debug, a thorough course might cover it in a year, it is used for introduction to programming course. I"m taking McWhorter's course, i'm on lesson 21, my guess is c on embedded arduino is harder than on larger pc platform,less well behaved, less memory. But embedded processors have been used paired with a few sensors, or a few actuators, your 15,000 line senior semester project will not fit in it. McWhorter slowly develops physics of leds, use of leds, resistors, potentiometer, basic ideas of binary numbers,
if, while, for, c concepts. But you learn to output digital and pulse width modulation to leds, and read, analog to
digital to the arduino. So you learn the steps of reading sensors and writing to actuators, while you are learning the basics of c programming. Extraordinary! Just enough about how the led's work to make it
a detailed "thick" object. He is a master teacher, but one its subject is how to use arduino + C to talk and
control sensors and actuators. And not so much understanding total structure and instruction sets of arduino
boards and chips. But he shows you basic functions of use the sensors, writing to actuators, motors, and
it is explained so well that you aren't afraid to USE THE ARDUINO FOR USING SENSORS AND ACTUATORS
WITH SOFTWARE. So in summary, you learn basic c control structures, a
While (my sensor reports() ) {
if ( my sensor values are in range ) {
do something ;
}
else ( my senors values dangerous) {
take efforts to avoid danger
}
} // end while

the course has basic intro to computers, basic electronics, basic programming, talking to sensing, motor
controls not just floats, ints, and strings.

Table of contents of Paul McWhorter 2019 edition videos.
ttps://www.youtube.com/watch?v=fJWR7dBuc18&list=PLGs0VKk2DiYw-L-RibttcvK-WBZm8WLEP