Book Image

C Programming for Arduino

By : Julien Bayle
Book Image

C Programming for Arduino

By: Julien Bayle

Overview of this book

Physical computing allows us to build interactive physical systems by using software & hardware in order to sense and respond to the real world. C Programming for Arduino will show you how to harness powerful capabilities like sensing, feedbacks, programming and even wiring and developing your own autonomous systems. C Programming for Arduino contains everything you need to directly start wiring and coding your own electronic project. You'll learn C and how to code several types of firmware for your Arduino, and then move on to design small typical systems to understand how handling buttons, leds, LCD, network modules and much more. After running through C/C++ for the Arduino, you'll learn how to control your software by using real buttons and distance sensors and even discover how you can use your Arduino with the Processing framework so that they work in unison. Advanced coverage includes using Wi-Fi networks and batteries to make your Arduino-based hardware more mobile and flexible without wires. If you want to learn how to build your own electronic devices with powerful open-source technology, then this book is for you.
Table of Contents (21 chapters)
C Programming for Arduino
About the Author
About the Reviewers

Checking all basic development steps

We are not here together to understand the entire details of code compilation. But I want to give you a global explanation that will help you to understand better how it works under the hood. It will also help you to understand how to debug your source code and why something wouldn't work in any random case.

Let's begin by a flowchart showing the entire process.

From the source code to the binary executable code

The following steps are executed to take the code from the source to the executable production stage:

  1. The C and C++ source code is just the type of code you already wrote for the Blink250ms project in Chapter 1, Let's Plug Things.

  2. Headers are usually included at the beginning of your code, and they refer to other files with the extension .h in which there are some definitions and class declarations. This kind of design, in which you have separate files for the source code (the program you are currently writing) and the headers (already made elements...