What you need for this book
Describing every permutation and combination to set up BeagleBone Black is beyond the scope of this book. Although every recipe starts by describing your hardware requirements, we will suggest a baseline setup here that can be assumed for nearly all chapters.
There will be a number of recipes scattered throughout the book that require additional hardware, such as sensors, jumper wires, resistors, breadboards, and so on. Never fear! The vast majority of these parts is very low cost and typically already a part of your physical computing and electronic kits. There are a few examples, however, where you might need to spend a little more money on daughterboards (called capes) and some other peripherals, such as powered USB hubs.
The hardware requirements are as follows:
- BeagleBone Black Revision C: Typically referred to as Rev C, the version of the board we will use is the most current one available on the market at the time of writing. Earlier versions should work with the vast majority of the recipes in this book; however, we cannot guarantee their reliability in all cases.
- MicroSD card (minimum 8 GB): Even though the board has an internal solid-state drive (eMMC) to run the OS, we often need to test recipes and different flavors of the kernel. So, being able to quickly swap out the operating system on a MicroSD card is an enormous timesaver. In fact, you will see us more commonly booting from the MicroSD than the internal drive.
- Power supply: You have more than one option to power up, though the recipe will recommend specifically which of these to use:
- 5V power: This is a 5V 2A (2000mA) switching power supply.
- A mini-B USB cable: A great many of the recipes allow you to power the board with nothing more than the USB cable that should have come with your board when you purchased it. The standard USB connector goes into the USB port on your desktop client, which becomes the power source for BeagleBone Black.
- Display: There are basically three options to get a display going on your board:
- An HDMI screen: This out-of-the box approach assumes that you will connect your board to an HDMI monitor. Compatible hardware is listed at http://elinux.org/Beagleboard:BeagleBoneBlack_HDMI. If you do use this option, you will need a micro HDMI to standard HDMI cable.
- A mini LCD or "cape": We will learn how to connect a small LCD to the board's header pins. As this is somewhat of a custom solution, we do not assume that you will typically use this method except in relevant use cases.
- A remote session: As we will see in an early chapter, much of your work on BeagleBone Black can be done via remote sessions using Secure Shell (SSH) on a client desktop machine, such as a Mac or Windows box. Note that this will be our favored approach and recommendation because it obviates the need for a keyboard, monitor, and mouse.
- A USB hub: We frequently recommend a powered hub, otherwise, the board's power draw will cause some peripherals, such as Bluetooth dongles, to underperform or not perform at all. Note that this must be a powered USB hub.
- A client machine: Interacting and controlling BeagleBone Black is often greatly simplified by connecting it to a client desktop machine running Windows, Mac OS, or even Linux. We are biased toward the Mac OS, so most of the recipes assume that you are using a Macintosh box. However, if you are not on Mac, the recipes are essentially the same and the principal steps and code are not affected.
- A board enclosure: This is not actually a requirement but a highly recommended "nice-to-have" tool. Besides protecting the board from damage, enclosing it in some kind of small box makes it much more manageable, especially when you have multiple wires snaking all over the place. You can find a variety of enclosures at http://bit.ly/1KTNPbF and on our site at http://bit.ly/1WrBqrv.
The software requirements are as follows:
- Debian Linux: If you purchased your board directly from a well-established distributor, it should have come preloaded with Debian 7 Wheezy (kernel 3.8.x-bone kernel), which will be our principal assumption for the OS. We will also be referencing Debian 8 Jessie (kernel 3.14.x).
You will learn to load other versions of the software as we proceed through the book. Note that prior versions of the board were shipped with Angstrom Linux. However, this book will not run recipes using this distribution.
- Homebrew: If you are using a Mac box, adding Homebrew to Mac gives you Linux-savvy tools on your desktop. It includes a basket of Linux utilities so that you don't always have to fire up the board to run a test. For a "how-to" on installing Homebrew, refer to the developers' website at http://brew.sh/.
- Drivers: If on Mac, install the latest versions of developer Joshua Wise's HoRNDIS drivers for USB tethering to BeagleBone Black, which you can find at http://joshuawise.com/horndis#available_versions. We will provide more details on this step in Chapter 1, Setting Up for the First Time.