Book Image

Intel Galileo Essentials

Book Image

Intel Galileo Essentials

Overview of this book

Table of Contents (15 chapters)
Intel Galileo Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Getting signals from the outside world


You know how to send signals to the outside world. You might also want to receive input signals from the outside world. These signals can be divided into two types: digital signals and analog signals.

Interfacing digital input signals with Galileo

There are pins on the GPIO connectors of the Galileo than can be used to sense digital input; that is, an input that will be interpreted as either a 0 or 1 by a program. These are labelled on the Galileo. An example of how to use these is a simple button press circuit. To create this circuit, you'll need one of the 220-ohm resistors you used in the LED circuit. You'll also need a simple, single-pole, single-throw switch; you can get these at most electronics stores. You'll also need some jumper wires to connect the Galileo to your circuit. Here is the circuit diagram:

Now you'll need some code. You can use one of the example programs included with the IDE. Select the Examples | 02.Digital | Button code, like...