Go Down

Topic: C/C++ Course Specifically for Arduino programming (Read 32184 times) previous topic - next topic


Eddiie


econjack

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

RuskinF

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.

Rwmurphree

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

Rwmurphree

link McWhorter Arduino Tutorial
https://www.youtube.com/watch?v=fJWR7dBuc18&list=PLGs0VKk2DiYw-L-RibttcvK-WBZm8WLEP

terryking228

Quote
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.
Hmmm.. Not sure I agree...  Same Gcc compiler used on many,many boards and projects. And there are several Arduino versions, with LOTS of memory.

I have a complex (to me)home automation system in about 2500 lines. It users 23% of an Arduino Mega.
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Rwmurphree

Terry, i'm a arduino newbie,
some arduino mega's have 256 KB,
I see nano ble has 1 MB of memory. so yes that might allow larger programs.
My elegoo  kit has an arduino uno with 32K flash.
I remember programming pre-ibm pc desktop pc in the 70's with 128K and 256K (vector graphics) with large 7in floppy drives so the arduino uno v3 might look like a small memory to some.

Go Up