Book Image

Learning C for Arduino

By : Syed Omar Faruk Towaha
Book Image

Learning C for Arduino

By: Syed Omar Faruk Towaha

Overview of this book

This book will start with the fundamentals of C programming and programming topics, such data types, functions, decision making, program loops, pointers, and structures, with the help of an Arduino board. Then you will get acquainted with Arduino interactions with sensors, LEDs, and autonomous systems and setting up the Arduino environment. Moving on you will also learn how to work on the digital and analog I/O, establish serial communications with autonomous systems, and integrate with electronic devices. By the end of the book, you will be able to make basic projects such as LED cube and smart weather system that leverages C.
Table of Contents (17 chapters)
Learning C for Arduino
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Object Oriented Programming


Before talking about the more complex concepts within OOPs, we need to know what an Object Oriented Programming language is.

The C programming language is not an Object Oriented Programming language. In Arduino we use a modified version of C which can be compared to C++ programming. And, since C++ is an Object Oriented Programming language, we can implement the benefits of OOP in our Arduino projects.

An Object Oriented Programming language must have a few characteristics (inheritance, encapsulation, polymorphism, and so on) in order to be defined as an Object Oriented Programming language. C is an implementation language. In short, in C, we write a long code. But in OOPs, the code can be shortened using a number of techniques. These techniques are the OOPs's characters.

Objects

In our daily life, everything we see and feel is an object. The earth is an object, the moon is an object, a chair is an object-even your dog is an object. Whatever you can touch, smell, feel...