Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Arduino Development Cookbook

You're reading from   Arduino Development Cookbook Over 50 hands-on recipes to quickly build and understand Arduino projects, from the simplest to the most extraordinary

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781783982943
Length 246 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Cornel M Amariei Cornel M Amariei
Author Profile Icon Cornel M Amariei
Cornel M Amariei
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Power on – Arduino Basics FREE CHAPTER 2. Blinking LEDs 3. Working with Buttons 4. Sensors 5. Motor Control 6. More Output Devices 7. Digital Communication with Arduino 8. Hacking A. Electronics – the Basics Index

Downloading the Arduino software

The first thing we need is the Arduino Integrated Development Environment (IDE). One of the best parts about Arduino is that the software in which we need to program the boards is free and open source. The Arduino IDE is compatible with Windows, Mac OS X, and Linux.

Getting ready

We only need one thing to complete this recipe—a computer connected to the Internet.

How to do it…

Follow these simple steps:

  1. Visit the Arduino website at http://arduino.cc/.
  2. In the main menu, go to the Download section.
  3. Select your operating system and download the latest stable release of the Arduino software. At the time of writing, the latest stable version compatible with all standard boards was version 1.0.5.
  4. After it downloads, install the Arduino software.

There's more

Now that we have the Arduino IDE installed, let's familiarize ourselves with the user interface.

Here is a screenshot of the Arduino software running on Windows. It looks the same on Mac and Linux, since it's all written in Java.

There's more

First, we will discuss the Tool Bar. In the Tool Bar, we can find the most used buttons:

Button

Description

There's more

The Verify button compiles the code and checks it for errors.

There's more

The Upload button compiles the code and, if there is no error in the code, uploads it to the Arduino board.

There's more

The New button starts a new program. In the Arduino world, programs are called sketches.

There's more

The Open button simply allows us to open a saved sketch.

There's more

The Save button saves the current sketch.

There's more

This button opens the Serial Monitor window that allows us to communicate with the Arduino board. It is extremely helpful when we debug a program. More information can be found in the Serial output recipe in Chapter 7, Digital Communication with Arduino

In the Sketch tab, we can see all the opened Arduino Sketches. This comes handy when we want to work on multiple programs at the same time.

The Code Space area is where all the magic happens. That's where we write the code that powers satellites and cat food dispensers. It's a code editor with automatic syntax highlighting and autoarranging.

The Status Display area indicates all the bad stuff. Whenever there are errors in the code, they will be displayed there. It also displays errors in the connection with the board. The only good thing it can display is that the code has been successfully uploaded to the Arduino board.

Additional functionality can be found in the main menu bar. Here, we have the classic File menu where we have Save, Open, Close, and also some examples. In the following recipes, more will be discussed about the menu bar components. A nice trick worth sharing is in the Tools menu—the Auto Format tool will format the code to look professional and clean.

See also

Consider the following recipes to better understand how to use the Arduino software environment:

  • The Connecting Arduino recipe
  • The Uploading code to Arduino recipe
You have been reading a chapter from
Arduino Development Cookbook
Published in: Apr 2015
Publisher:
ISBN-13: 9781783982943
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime