Chapter 10. Arduino and Raspberry Pi

10.0 Introduction

There is a good chance that any electronics project that you embark on will involve the use of a microcontroller (in the form of an Arduino) or a single-board computer (SBC) like the Raspberry Pi. Our gadgets are becoming more intelligent, requiring a little computer brain to control them; they are also becoming more connected, often needing an interface to the internet.

A typical Maker’s electronics project these days will involve the use of a microcontroller or SBC with some electronics to switch things or sense value, or both. These extra electronics are attached to the microcontroller or SBC using its GPIO (general-purpose input/output) pins.

In this chapter the recipes mostly focus on the electronic side of interfacing with a microcontroller or SBC in general, but will also use the Arduino and Raspberry Pi as examples.

10.1 Explore Arduino

Problem

You want to understand just what an “Arduino” is and why it finds its way into so many electronics projects.

Solution

Figure 10-1 shows the most popular flavor of Arduino, the Arduino Uno R3.

F10_01
Figure 10-1. An Arduino Uno

An Arduino is not a microcontroller but instead a microcontroller interface board. It has a microcontroller chip on the board, but it also has a whole load of other components that provide:

  • Regulated power to the microcontroller
  • A USB interface to program ...

Get Electronics Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.