Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learn Arduino Prototyping in 10 days
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learn Arduino Prototyping in 10 days

Learn Arduino Prototyping in 10 days

By : Bosu Roy Choudhuri
4.8 (13)
close
close
Learn Arduino Prototyping in 10 days

Learn Arduino Prototyping in 10 days

4.8 (13)
By: Bosu Roy Choudhuri

Overview of this book

This book is a quick, 10-day crash course that will help you become well acquainted with the Arduino platform. The primary focus is to empower you to use the Arduino platform by applying basic fundamental principles. You will be able to apply these principles to build almost any type of physical device. The projects you will work through in this book are self-contained micro-controller projects, interfacing with single peripheral devices (such as sensors), building compound devices (multiple devices in a single setup), prototyping standalone devices (powered from independent power sources), working with actuators (such as DC motors), interfacing with an AC-powered device, wireless devices (with Infrared, Radio Frequency and GSM techniques), and finally implementing the Internet of Things (using the ESP8266 series Wi-Fi chip with an IoT cloud platform). The first half of the book focuses on fundamental techniques and building basic types of device, and the final few chapters will show you how to prototype wireless devices. By the end of this book, you will have become acquainted with the fundamental principles in a pragmatic and scientific manner. You will also be confident enough to take up new device prototyping challenges.
Table of Contents (13 chapters)
close
close
4
Day 2 - Interfacing with Sensors
In Progress | 0 / 6 sections completed | 0%
10
Day 8 - Short Range Wireless Communications
In Progress | 0 / 5 sections completed | 0%

Arduino program structure and execution

In this section we will study the general structure of an Arduino sketch. After going through this section you will be able to understand the important parts of an Arduino sketch. This section will also explain how each part of an Arduino sketch gets executed in the Arduino development board.

Arduino C programs are called sketches. A basic sketch structure needs at least two functions in the program body. These functions are listed as follows:

  • setup()
  • loop()

These functions should always have a same name that is, setup() and loop(). The Arduino development board is pre-programed to execute a loaded sketch by looking for these two function names in the body of a sketch. So if these two function names are not present in the C sketch, then the Arduino IDE will not even compile the sketch successfully. Instead the following errors will be...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY