Programming Arduino Getting Started with Sketches
Programming Arduino: Getting Started with Sketches
Arduino interface boards provide a low-cost, easy-to-use technology to create microcontroller-based projects. With a little electronics, you can make your Arduino do all sorts of things, from controlling lights in an art installation to managing the power on a solar energy system.
There are many project-based books that show you how to connect things to your Arduino, including 30 Arduino Projects for the Evil Genius by this author. However, the focus of this book is on programming the Arduino.
This book will explain how to make programming the Arduino simple and enjoyable, avoiding the difficulties of uncooperative code that so often afflict a project. You will be taken through the process of programming the Arduino step by step, starting with the basics of the C programming language that Arduinos use.
So, What Is Arduino?
Arduino is a small microcontroller board with a universal serial bus (USB) plug to connect to your computer and a number of connection sockets that can be wired to external electronics such as motors, relays, light sensors, laser diodes, loudspeakers, microphones, and more. They can either be powered through the USB connection from the computer, from a 9V battery, or from a power supply. They can be controlled from the computer or programmed by the computer and then disconnected and allowed to work independently.
The board design is open source. This means that anyone is allowed to make Arduino-compatible boards. This competition has lead to low costs for the boards.
The basic boards are supplemented by accessory shield boards that can be plugged on top of the Arduino board. In this book, we will use two shields—an LCD display shield and an Ethernet shield—that will allow us to turn our Arduino into a tiny web server.
The software for programming your Arduino is easy to use and also freely available for Windows, Mac, and LINUX computers.
What Will I Need?
This is a book intended for beginners, but it is also intended to be useful to those who have used Arduino for a while and want to learn more about programming the Arduino or gain a better understanding of the fundamentals.
You do not need to have any programming experience or a technical background, and the book’s exercises do not require any soldering. All you need is the desire to make something.
If you want to make the most of the book and try out some of the experiments, then it is useful to have the following on hand:
• A few lengths of solid core wire
• A cheap digital multimeter
Both are readily available for a few dollars from a hobby electronics shop such as Radio Shack. You will of course also need an Arduino Uno board.
If you want to go a step further and experiment with Ethernet and the liquid crystal display (LCD) shield, then you will need to buy shields that are available from online stores. See Chapters 9 and 10 for details.
Using this Book
This book is structured to get you started in a really simple way and gradually build on what you have learned. You may, however, find yourself skipping or skimming some of the early chapters as you find the right level to enter the book.
The book is organized into the following chapters:
• Chapter 1: This Is Arduino An introduction to the Arduino hardware, this chapter describes what it is capable of, and the various types of, Arduino boards that are available.
• Chapter 2: Getting Started Here you conduct your first experiments with your Arduino board: installing the software, powering it up, and uploading your first sketch.
• Chapter 3: C Language Basics This chapter covers the basics of the C language; for complete programming beginners, the chapters also serves as an introduction to programming in general.
• Chapter 4: Functions This chapter explains the key concept of using and writing functions in Arduino sketches. These sketches are demonstrated throughout with runnable code examples.
• Chapter 5: Arrays and Strings Here you learn how to make and use data structures that are more advanced than simple integer variables. A Morse code example project is slowly developed to illustrate the concepts being explained.
• Chapter 6: Input and Output You learn how to use the digital and analog inputs and outputs on the Arduino in your programs. A multimeter will be useful to show you what is happening on the Arduino’s input/output connections.
• Chapter 7: The Standard Arduino Library This chapter explains how to make use of the standard Arduino functions that come in the Arduino’s standard library.
• Chapter 8: Data Storage Here you learn how to write sketches that can save data in electrically erasable read-only memory (EEPROM) and make use of the Arduino’s built-in flash memory.
• Chapter 9: LCD Displays In this chapter, you program with the LCD Shield library to make a simple USB message board example.
• Chapter 10: Arduino Ethernet Programming You learn how to make the Arduino behave like a web server as you get a little background on HyperText Markup Language (HTML) and the HyperText Transfer Protocol (HTTP).
• Chapter 11: C++ and Libraries You go beyond C, looking at adding object-orientation and writing your own Arduino libraries.
|Download Ebook||Read Now||File Type||Upload Date|
|November 29, 2016|
Do you like this book? Please share with your friends, let's read it !! :)How to Read and Open File Type for PC ?