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

Downloading and installing Arduino IDE


Arduino IDE is an Integrated Development Environment where we can write code, debug and upload to our Arduino Uno or any other board.

Downloading Arduino IDE

To download Arduino IDE, we need to go to https://www.arduino.cc/en/Main/Software and you will see the following page:

We will download the package associated with our Operating System.

Installing Arduino IDE

Let's install Arduino IDE on our system.

Installing Arduino IDE on Windows

To install Arduino IDE on Windows, go to the previous link and download Windows Installer or Windows Zip file for non admin install. I would recommend you choose the installer file because the other file is a portable IDE, which may show errors with the drivers of the Arduino.

You will see the following page after clicking on any of the files:

You may Contribute and Download or Just Download.

After downloading the Windows Installer file, you will have an .exe file. Double click on the file to get started. I would recommend right clicking on the .exe file and selecting Run as Administrator,as shown in the image below:

The rest of the processes are similar to an ordinary installation.

Installing Arduino IDE on Ubuntu/Linux

On most modern Linux distributions you can download the Linux 32 bits or Linux 64 bits depending on your system architecture.

On Ubuntu and most Debian-based distributions you can use the command line to download and install the IDE from official package sources. Open your terminal ( Ctrl+Alt+T) and write the following line and press Enter.

sudo apt-get install arduino arduino-core

You will be prompted to enter your password. Enter your password and hit Enter :

You will be shown the following message on your terminal. Type Y and hit Enter :

If no error occurs, you will see the following screen:

Installing Arduino IDE on Mac

To install Arduino IDE for mac, download the Mac OS X 10.7 Lion or newer file. You will see the Arduino.app file in your download folder. Double click on the file and you will first see a message that says verifying the Arduino.app. Then you will see a warning as the following image:

Click Open to open the Arduino IDE.

You may not see the option Open . All you need is to press the Control/Option Key of your mac and click on the Arduino.app  file, and you will see the Open option.

You may copy the Arduino.app file into your Application folder for frequent access.