
BeagleBone Cookbook
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
BeagleBone is an inexpensive web server, Linux desktop, and electronics hub that includes all the tools you need to create your own projects?whether it's robotics, gaming, drones, or software-defined radio. If you're new to BeagleBone Black, or want to explore more of its capabilities, this cookbook provides scores of recipes for connecting and talking to the physical world with this credit-card-sized computer.
All you need is minimal familiarity with computer programming and electronics. Each recipe includes clear and simple wiring diagrams and example code to get you started. If you don't know what BeagleBone Black is, you might decide to get one after scanning these recipes.
- Learn how to use BeagleBone to interact with the physical world
- Connect force, light, and distance sensors
- Spin servo motors, stepper motors, and DC motors
- Flash single LEDs, strings of LEDs, and matrices of LEDs
- Manage real-time input/output (I/O)
- Work at the Linux I/O level with shell commands, Python, and C
- Compile and install Linux kernels
- Work at a high level with JavaScript and the BoneScript library
- Expand BeagleBone's functionality by adding capes
- Explore the Internet of Things
More details
Other editions
Additional editions

Content
- Intro
- Table of Contents
- Preface
- Who This Book Is For
- How to Use This Book
- Conventions Used in This Book
- Using Code Examples
- About the Diagrams
- Safari® Books Online
- How to Contact Us
- Acknowledgments
- Chapter 1. Basics
- 1.0 Introduction
- 1.1 Picking Your Beagle
- Problem
- Solution
- Discussion
- 1.2 Getting Started, Out of the Box
- Problem
- Solution
- Discussion
- 1.3 Verifying You Have the Latest Version of the OS on Your Bone
- Problem
- Solution
- Discussion
- 1.4 Running the BoneScript API Tutorials
- Problem
- Solution
- Discussion
- 1.5 Wiring a Breadboard
- Problem
- Solution
- Discussion
- 1.6 Editing Code Using the Cloud9 IDE
- Problem
- Solution
- Discussion
- 1.7 Running JavaScript Applications from the Cloud9 IDE
- Problem
- Solution
- Discussion
- 1.8 Running Applications Automatically
- Problem
- Solution
- Discussion
- 1.9 Finding the Latest Version of the OS for Your Bone
- Problem
- Solution
- Discussion
- 1.10 Running the Latest Version of the OS on Your Bone
- Problem
- Solution
- Discussion
- 1.11 Updating the OS on Your Bone
- Problem
- Solution
- Discussion
- 1.12 Backing Up the Onboard Flash
- Problem
- Solution
- Discussion
- 1.13 Updating the Onboard Flash
- Problem
- Solution
- Chapter 2. Sensors
- 2.0 Introduction
- 2.1 Choosing a Method to Connect Your Sensor
- Problem
- Solution
- Discussion
- 2.2 Input and Run a JavaScript Application for Talking to Sensors
- Problem
- Solution
- Discussion
- 2.3 Reading the Status of a Pushbutton or Magnetic Switch (Passive On/Off Sensor)
- Problem
- Solution
- Discussion
- 2.4 Reading a Position, Light, or Force Sensor (Variable Resistance Sensor)
- Problem
- Solution
- Discussion
- 2.5 Reading a Distance Sensor (Analog or Variable Voltage Sensor)
- Problem
- Solution
- Discussion
- 2.6 Reading a Distance Sensor (Variable Pulse Width Sensor)
- Problem
- Solution
- Discussion
- 2.7 Accurately Reading the Position of a Motor or Dial
- Problem
- Solution
- Discussion
- See Also
- 2.8 Acquiring Data by Using a Smart Sensor over a Serial Connection
- Problem
- Solution
- Discussion
- 2.9 Measuring a Temperature
- Problem
- Solution
- Discussion
- 2.10 Reading Temperature via a Dallas 1-Wire Device
- Problem
- Solution
- Discussion
- 2.11 Sensing All Sorts of Things with SensorTag via Bluetooth v4.0
- Problem
- Solution
- Discussion
- 2.12 Playing and Recording Audio
- Problem
- Solution
- Discussion
- Chapter 3. Displays and Other Outputs
- 3.0 Introduction
- 3.1 Toggling an Onboard LED
- Problem
- Solution
- Discussion
- 3.2 Toggling an External LED
- Problem
- Solution
- Discussion
- 3.3 Toggling a High-Voltage External Device
- Problem
- Solution
- Discussion
- 3.4 Fading an External LED
- Problem
- Solution
- Discussion
- 3.5 Writing to an LED Matrix
- Problem
- Solution
- Discussion
- 3.6 Driving a 5 V Device
- Problem
- Solution
- Discussion
- 3.7 Writing to a NeoPixel LED String
- Problem
- Solution
- Discussion
- 3.8 Using a Nokia 5510 LCD Display
- Problem
- Solution
- Discussion
- 3.9 Making Your Bone Speak
- Problem
- Solution
- Discussion
- Chapter 4. Motors
- 4.0 Introduction
- 4.1 Controlling a Servo Motor
- Problem
- Solution
- Discussion
- 4.2 Controlling the Speed of a DC Motor
- Problem
- Solution
- Discussion
- See Also
- 4.3 Controlling the Speed and Direction of a DC Motor
- Problem
- Solution
- Discussion
- 4.4 Driving a Bipolar Stepper Motor
- Problem
- Solution
- Discussion
- 4.5 Driving a Unipolar Stepper Motor
- Problem
- Solution
- Discussion
- Chapter 5. Beyond the Basics
- 5.0 Introduction
- 5.1 Running Your Bone Standalone
- Problem
- Solution
- Discussion
- 5.2 Selecting an OS for Your Development Host Computer
- Problem
- Solution
- Discussion
- 5.3 Getting to the Command Shell via SSH
- Problem
- Solution
- Discussion
- 5.4 Getting to the Command Shell via the Virtual Serial Port
- Problem
- Solution
- Discussion
- 5.5 Viewing and Debugging the Kernel and u-boot Messages at Boot Time
- Problem
- Solution
- Discussion
- 5.6 Verifying You Have the Latest Version of the OS on Your Bone from the Shell
- Problem
- Solution
- Discussion
- 5.7 Controlling the Bone Remotely with VNC
- Problem
- Solution
- Discussion
- 5.8 Learning Typical GNU/Linux Commands
- Problem
- Solution
- Discussion
- 5.9 Editing a Text File from the GNU/Linux Command Shell
- Problem
- Solution
- Discussion
- 5.10 Using a Graphical Editor
- Problem
- Solution
- 5.11 Establishing an Ethernet-Based Internet Connection
- Problem
- Solution
- Discussion
- 5.12 Establishing a WiFi-Based Internet Connection
- Problem
- Solution
- Discussion
- 5.13 Sharing the Host's Internet Connection over USB
- Problem
- Solution
- Discussion
- 5.14 Setting Up a Firewall
- Problem
- Solution
- Discussion
- 5.15 Installing Additional Packages from the Debian Package Feed
- Problem
- Solution
- Discussion
- 5.16 Removing Packages Installed with apt-get
- Problem
- Solution
- Discussion
- 5.17 Copying Files Between the Onboard Flash and the MicroSD Card
- Problem
- Solution
- Discussion
- 5.18 Freeing Space on the Onboard Flash or MicroSD Card
- Problem
- Solution
- Discussion
- 5.19 Installing Additional Node.js Packages
- Problem
- Solution
- Discussion
- 5.20 Using Python to Interact with the Physical World
- Problem
- Solution
- Discussion
- 5.21 Using C to Interact with the Physical World
- Problem
- Solution
- Discussion
- Chapter 6. Internet of Things
- 6.0 Introduction
- 6.1 Accessing Your Host Computer's Files on the Bone
- Problem
- Solution
- Discussion
- 6.2 Serving Web Pages from the Bone
- Problem
- Solution
- Discussion
- 6.3 Interacting with the Bone via a Web Browser
- Problem
- Solution
- Discussion
- 6.4 Displaying GPIO Status in a Web Browser
- Problem
- Solution
- Discussion
- 6.5 Continuously Displaying the GPIO Value via jsfiddle
- Problem
- Solution
- Discussion
- See Also
- 6.6 Continuously Displaying the GPIO Value
- Problem
- Solution
- Discussion
- 6.7 Plotting Data
- Problem
- Solution
- Discussion
- 6.8 Sending an Email
- Problem
- Solution
- Discussion
- 6.9 Sending an SMS Message
- Problem
- Solution
- Discussion
- 6.10 Displaying the Current Weather Conditions
- Problem
- Solution
- Discussion
- 6.11 Sending and Receiving Tweets
- Problem
- Solution
- Discussion
- 6.12 Wiring the IoT with Node-RED
- Problem
- Solution
- Discussion
- 6.13 Serving Web Pages from the Bone by Using Apache
- Problem
- Solution
- Discussion
- 6.14 Communicating over a Serial Connection to an Arduino or LaunchPad
- Problem
- Solution
- Discussion
- Chapter 7. The Kernel
- 7.0 Introduction
- 7.1 Updating the Kernel
- Problem
- Solution
- Discussion
- 7.2 Building and Installing Kernel Modules
- Problem
- Solution
- Discussion
- 7.3 Controlling LEDs by Using SYSFS Entries
- Problem
- Solution
- Discussion
- 7.4 Controlling GPIOs by Using SYSFS Entries
- Problem
- Solution
- Discussion
- 7.5 Compiling the Kernel
- Problem
- Solution
- Discussion
- 7.6 Using the Installed Cross Compiler
- Problem
- Solution
- Setting Up Variables
- Discussion
- 7.7 Applying Patches
- Problem
- Solution
- Discussion
- 7.8 Creating Your Own Patch File
- Problem
- Solution
- Discussion
- Chapter 8. Real-Time I/O
- 8.0 Introduction
- 8.1 I/O with BoneScript
- Problem
- Solution
- Discussion
- 8.2 I/O with C and libsoc
- Problem
- Solution
- Discussion
- 8.3 I/O with devmem2
- Problem
- Solution
- Discussion
- 8.4 I/O with C and mmap()
- Problem
- Solution
- Discussion
- 8.5 Modifying the Linux Kernel to Use Xenomai
- Problem
- Solution
- Discussion
- 8.6 I/O with PRU Speak
- Problem
- Solution
- Discussion
- Chapter 9. Capes
- 9.0 Introduction
- 9.1 Using a Seven-Inch LCD Cape
- Problem
- Solution
- Discussion
- 9.2 Using a 128 x 128-Pixel LCD Cape
- Problem
- Solution
- Discussion
- 9.3 Connecting Multiple Capes
- Problem
- Solution
- Discussion
- 9.4 Moving from a Breadboard to a Protoboard
- Problem
- Solution
- Discussion
- 9.5 Creating a Prototype Schematic
- Problem
- Solution
- Discussion
- 9.6 Verifying Your Cape Design
- Problem
- Solution
- Discussion
- 9.7 Laying Out Your Cape PCB
- Problem
- Solution
- Discussion
- 9.8 Migrating a Fritzing Schematic to Another Tool
- Problem
- Solution
- Discussion
- 9.9 Producing a Prototype
- Problem
- Solution
- Discussion
- 9.10 Creating Contents for Your Cape Configuration EEPROM
- Problem
- Solution
- Discussion
- 9.11 Putting Your Cape Design into Production
- Problem
- Solution
- Discussion
- Appendix A. Parts and Suppliers
- Parts
- Prototyping Equipment
- Resistors
- Transistors and Diodes
- Integrated Circuits
- Opto-Electronics
- Capes
- Miscellaneous
- Index
- About the Authors
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.