Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arduino Development Cookbook

You're reading from  Arduino Development Cookbook

Product type Book
Published in Apr 2015
Publisher
ISBN-13 9781783982943
Pages 246 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Cornel M Amariei Cornel M Amariei
Profile icon Cornel M Amariei

Table of Contents (16) Chapters

Arduino Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Power on – Arduino Basics 2. Blinking LEDs 3. Working with Buttons 4. Sensors 5. Motor Control 6. More Output Devices 7. Digital Communication with Arduino 8. Hacking 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.

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

Button

Description

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

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

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

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

The Save button saves the current sketch.

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 $15.99/month. Cancel anytime}