.st0{fill:#FFFFFF;}

Arduino

Resources for your first steps with AVR C++ and writing awesome C 

 February 15, 2019

By  Peter

Join Our Mailing List

We publish fresh content each week. Read how-to's on Arduino, ESP32, KiCad, Node-RED, drones and more. Listen to interviews. Learn about new tech with our comprehensive reviews. Get discount offers for our courses and books. Interact with our community.

One email per week, no spam, unsubscribe at any time.

The world of embedded devices is dominated by C and its derivatives, primarily C++. These days, very few people learn C as their first language. In most cases, a new Arduino maker will have learned BASIC or Python at school or the University.

In most cases, people will pick up the little C/C++ they need for their Arduino sketches from tutorials, by playing around. At some point though, they will hit a wall, meaning that doing any serious work with their Arduino will require some concentrated study of C and C++.

In this short post, I’d like to share a few resources that you can use to get your C/C++ skills to the “next level.”

If you are new to C, start with MIT’s How to Write Awesome C. This is a short tutorial that is written to help competitors in MIT’s Autonomous Robot Design competition.

Once you have a good grasp of C, you can move onto C++. If you wish to study C++ specifically to use with AVR microcontrollers, then you need to follow a two-step process. First, become familiar with the basics of C++ (you do not need to become an expert), and then become familiar with the C++’s AVR-specifics.

An excellent resource to learn about C++ is the C++ Language Tutorial. It covers basic concepts like variables, control structures, and classes. I recommend that you only read and learn about C++’s basic features because the AVR implementation of the language does not support most of the more advanced features.

Have a look at this article for information about what parts of C++ are available in AVR.

Then, you will be more prepared to look into the AVR C++, as documented by Atmel. Here’s is the source documentation. This document needs a lot of patience to read, but keep it in mind as a reference source. An excellent tutorial to help you get started programming an AVR microcontroller outside the Arduino environment is this one by Hackaday (go straight to Part 4).

I should probably write a guide about this topic soon, but until then, I hope these resources help. If you have been able to find other useful resources on these topics, please let me know, and I will include them here.

Happy Making!

Ready for your next Arduino challenge?

If you are ready to take the next giant leap into Arduino awesomeness, consider enrolling to Arduino Step by Step Getting Serious.

This is a course for people that take their education seriously, and want to get better in making stuff with the Arduino.

With so much to learn, the best time to start is now.


Tags


You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Understanding the power requirements is crucial for any enthusiast using the Arduino Uno in their projects. How you manage voltage, amperage, and power sources impacts the success or failure of your endeavours. In this guide,

Read More
The Ultimate Guide to Powering Your Arduino Uno Board

If you are curious about how electronic devices work, understanding the fundamentals of the operation of their basic components is essential. Every electronic device—from the smartphones in our pockets to the satellites orbiting our planet—contains

Read More
A Guide to Essential Electronic Components in Circuits