📜 ⬆️ ⬇️

The book "Programming Arduino. Professional work with sketches »

image Meet the new book from Simon Monk, the author of the legendary bestseller “Programming Arduino. Basics of working with sketches "! Electronics Guru will help to overcome the difficult path from a beginner to a professional, easily solving the most difficult tasks of programming sketches. It's time to move on!

Projects are becoming more complex, and at some point there is not enough knowledge to implement them. After reading the book, you will learn how to use interrupts, manage memory, write programs for the Internet, perform digital signal processing, learn multi-tasking, and be able to create your own libraries.

This book is conceived as a continuation of the bestseller “Programming Arduino: Basics of working with sketches. 2nd ed. ". Although this book includes a brief repetition of the basics from the book Programming Arduino, it will introduce the reader to the more advanced aspects of Arduino board programming. In particular, this book will tell you how:

- to ensure efficient operation with a minimum amount of available memory;
- solve several problems at once without the help of multi-threaded execution mechanisms;
- pack the code into libraries so that others can use it;
- use hardware interrupts and timer interrupts;
- achieve maximum performance;
- reduce energy consumption;
- interact with serial buses of different types (I2C, 1-Wire, SPI and serial port);
- interact with the USB port;
- interact with the network;
- perform digital signal processing (Digital Signal Processing, DSP).
')

Downloadable examples


The book includes 75 examples of sketches, which are distributed in open form and are available on the website of the author www.simonmonk.org . Following the link to the page of this book, you can download the source code of the examples, as well as the most up-to-date list of errors and typos found in the book.

What is needed to read a book


This book is primarily devoted to programming issues. Therefore, to test most of the examples, the Arduino board, LED, and multimeter will suffice. If you have additional Arduino expansion cards, they will also come in handy. To review the examples in Chapter 12, you'll need an Ethernet or Wi-Fi card. Throughout the book, we will use different modules to demonstrate different interfaces.

The focus is on the Arduino Uno - the most widely used Arduino board, but the chapters on USB port programming and digital signal processing take up some of the features of other Arduino boards, such as the Leonardo and Arduino Due. In the appendix at the end of the book you will find a list of suppliers from which you can purchase all these components.

How to work with this book


Each chapter is devoted to a separate topic related to Arduino programming. The chapters of the book, except for Chapter 1, which provides a brief overview of the basics of the Arduino, can be read in any order. If you are an experienced developer, start with chapter 14 to understand some of the features of Arduino programming. The following is a brief description of the chapters.

Chapter 1 "Arduino Programming". This chapter contains a summary of Arduino programming. This is a tutorial for those who need to quickly learn the basics of Arduino.

Chapter 2 "Under the hood." In this chapter, we will look under the hood and see how the programs for the Arduino work and where they come from.

Chapter 3 "Interrupts and Timers." Beginners usually try not to use interrupts, and in vain, since they often turn out to be a convenient tool and their programming does not present any difficulties. However, interruptions have their pitfalls, and this chapter will tell you everything you need to know to avoid them.

Chapter 4, Accelerating the Arduino. Arduino boards are equipped with low-power processors with low speed, so sometimes you need to squeeze everything out of them. For example, the built-in digitalWrite function is reliable and easy to use, but inefficient, which is especially noticeable when you need to turn on several outputs simultaneously. In this chapter, you will learn how to increase its performance, as well as learn about other techniques for creating high-speed sketches.

Chapter 5 "Reducing electricity consumption." When batteries or solar cells are used to power the Arduino board, it is advisable to reduce power consumption. This can be achieved not only by optimizing the design of the device, but also by using special programming techniques.

Chapter 6 "Memory." In this chapter, we will look at how to reduce memory consumption, as well as learn about the advantages and disadvantages associated with dynamic memory allocation in sketches.

Chapter 7 "I2C Interface". The I2C interface on the Arduino board can significantly simplify interaction with modules and components and allow you to get by with fewer pins on the board. This chapter describes how the I2C interface works and how to use it.

Chapter 8 "Interaction with 1-Wire devices". This chapter describes the 1-Wire bus for communicating with devices, such as Dallas Semiconductor temperature sensors, which are often used with Arduino boards. Here you will learn how this tire works and how to use it.

Chapter 9 "Interaction with SPI devices". SPI is another standard interface supported by Arduino boards. This chapter describes how it works and how to use it.

Chapter 10 "Programming a Serial Interface." Support for data transmission via a serial port, USB port, or Rx and Tx pins on an Arduino board is a great way to communicate with peripherals and other Arduino boards. In this chapter, you will learn how to use the serial port.

Chapter 11 "Programming the USB Interface." This chapter discusses various aspects of using a USB port on an Arduino board. You will learn how to emulate a keyboard and mouse, supported by the Arduino Leonardo board, and learn how to connect a keyboard or mouse to an appropriately equipped Arduino board.

Chapter 12 "Programming Networking". The Arduino board has long been a regular component of the “Internet of Things”. In this chapter, you will learn how to program the Arduino to work on the Internet. Topics discussed here include a description of Wi-Fi and Ethernet expansion cards, the use of web services, and the use of Arduino as a small web server.

Chapter 13 "Digital Signal Processing". The Arduino board is capable of performing simple signal processing. This chapter discusses various methods of such processing, from filtering a signal arriving at an analog input using software instead of external electronic devices to calculating the relative magnitude of various frequency signals using fast Fourier transform.

Chapter 14 "Multitasking with a single process." Programmers who have come to the world of Arduino from the world of large systems often point to the lack of support for multitasking in Arduino as a significant omission. In this chapter, I will try to fix it and show you how to overcome the limitations of the single-threaded model of embedded systems.

Chapter 15 "Creating Libraries". Sooner or later you will create something wonderful that you think others could use. It will be the right moment to arrange your code in the form of a library and release it into the light. This chapter will show you how to do this.

»More information about the book can be found on the publisher's website.
» Table of Contents
» Excerpt

For readers of this blog 25% discount coupon - Monk

Source: https://habr.com/ru/post/401367/


All Articles