Introducing the BeagleBone - Getting Started with the BeagleBone - BeagleBone For Dummies (2015)

BeagleBone For Dummies (2015)

Part I

Getting Started with the BeagleBone


webextras Visit for additional For Dummies content and resources.

In this part …

· Getting to know the BeagleBone and all its features

· Discovering other components that you may need

· Preparing your BeagleBone with the latest operating system

· Booting your BeagleBone for the first time

· Getting started in digital electronics by blinking an LED

Chapter 1

Introducing the BeagleBone

In This Chapter

arrow Getting acquainted with the BeagleBone

arrow Exploring the key differences between the two BeagleBone versions

arrow Exploring the possibilities the BeagleBone offers

arrow Determining what else you need

Welcome to the world of BeagleBone, the low-cost embedded Linux computer for hobbyists and developers used by hundreds of thousands of people all around the world

The BeagleBone is a tiny board, but don’t be fooled by its size: Its potential is huge. That board has a brain — the processor — that’s almost as smart as the latest popular smartphones, yet you can buy the BeagleBone at a fraction of the cost. Use it to control your home remotely, host your own server, or build a robot. You’re limited only by your imagination.

Actually, there’s no right or wrong way to use this small computer. Some people want to use it for programming; others want to use it find out about electronics. Still other people (such as the authors of this book) prefer to mix the two worlds to produce some awesome projects.

The day this tiny board hit the market, the price for entrée into the world of programming and electronics was significantly lowered — both in terms of actual money and in terms of ease of understanding. With the BeagleBone’s easy-to-use libraries and project examples, a novice can start creating a project in no time.

technicalstuff If you’re already familiar with these concepts — in the sense that you’ve worked with a microcontroller before, such as an Arduino — you’ll find that the BeagleBone can help you “one-up” your projects because it offers a lot more computational power and, consequently, a lot more capabilities than the Arduino and similar microcontrollers. With the BeagleBone, there are very few hardware limitations or software constraints, so you are able to tackle the most ambitious projects.

With an ever-growing community of makers, designers, and programmers around the world sharing their projects on the Internet, the BeagleBone is hands down one of the best ways to express your enthusiasm for technology. We highly encourage that you share your knowledge with others when you get to that point.

Touring the Original BeagleBone and the BeagleBone Black

When you first get your BeagleBone, you’ll find the board and a Mini USB cable inside the box. If you purchased an Original BeagleBone, you also get a 4GB microSD card. That’s everything you need to get started, along with your computer.

There are two distinct versions of the BeagleBone: the Original BeagleBone and the BeagleBone Black. The two boards are similar except for a few small details, which we explain in the next two sections of this chapter.

remember The contents of this book will generally make sense whether you’re using the Original BeagleBone or the BeagleBone Black. Whenever there’s a need to differentiate the two, we do so appropriately.

tip Another familiar, common designation on the web for the BeagleBone Black is BBB. We don’t use that designation throughout this book, but you may find it often if you do online research about matters related to the BeagleBone Black.

Whenever we simply use the term BeagleBone, there’s no difference between the two versions with regard to the concept we’re exploring.

At a first glance, you may feel intimidated about grabbing such bare boards (see Figure 1-1 and Figure 1-2). They are so tiny and seemingly fragile, yet so powerful. Certainly, you’re curious to understand all the tiny components sitting on top of your BeagleBone.

Following are the components featured in both the Original BeagleBone and the BeagleBone Black:

· Processor: You can call the processor the “brains” of your BeagleBone. Both boards feature an ARM Cortex-A8 operating at a maximum speed of 720MHz for the Original BeagleBone and 1GHz for the BeagleBone Black. This means that the latter makes a decision/calculation every 0.000000001 second!

· RAM: The Original BeagleBone has 256MB of DDR2 (Double Data Rate 2), whereas the BeagleBone Black has 512MB of DDR3.


Photo courtesy of Adafruit Industries

Figure 1-1: The Original BeagleBone.

· microSD card slot: The Original BeagleBone doesn’t have any built-in memory, so it always needs to have a microSD card inside to be able to work. By default, it comes with a 4GB microSD card. The BeagleBone Black doesn’t come with a microSD card because it has built-in memory. Regardless, you can still insert a microSD card into it to install or update your operating system or because you want to have more available memory to play around with.

· DC power connector: Your BeagleBone needs 5 volts (V) and 500 milliamps (mA) of direct current to power up.

tip Connecting the BeagleBone to your computer with a USB cable also provides the necessary power for the board to power up.

warning If you have a connector that fits into your BeagleBone connector, that doesn’t necessarily mean that it’s the right power adapter! Not all power adapters provide exactly 5V; some of them actually provide 12V. You also need to check for the connector’s polarity; the center ring has to provide the 5V and the outer ring has to provide Ground (GND). You need to be careful. Even though the board has a voltage regulator, feeding it excess power or wrong polarity could permanently damage it!


Figure 1-2: The BeagleBone Black.

· USB client: Both boards offer an USB client for powering up, communications, and debugging.

· USB host: Both boards include one USB port. This port enables you to connect peripherals such as a keyboard or a USB stick.

· Ethernet: Both boards feature a standard RJ45 Ethernet port. By plugging an Ethernet cable in it and connecting the BeagleBone directly to a router or by sharing the Wi-Fi connection of your computer, you can easily manage software on your BeagleBone, as well as build projects that require an Internet connection.

· Headers: The BeagleBone headers, labeled P8 and P9, can be used in many ways. You can use them to insert capes or supply power, for example, and you can program them to establish communications with other devices or act as inputs or outputs.

· USR LEDs: The USR LEDs indicate the status of your board:

· USR0: Blinks for as long as the system is running

· USR1: Blinks whenever the microSD card is being accessed

· USR2: Blinks to indicate that the central processing unit (CPU) is active

· USR3: For the BeagleBone Black, this LED blinks when the eMMC (embedded MultiMediaCard) memory is being accessed

· Reset button: This button resets your board when you press it. Keep in mind, though, that your BeagleBone is just like a regular computer; you should reboot it this way only when it crashes.

Besides the previously mentioned components, the BeagleBone Black has a few additional components (refer to Figure 1-2). These are:

· eMMC: The eMMC memory is the built-in memory on your BeagleBone Black. The amount you have depends on your BeagleBone Black’s revisions (Rev):

· BeagleBone Black Rev A and B: 2GB of eMMC memory

· BeagleBone Black Rev C: 4GB of eMMC memory

· Micro HDMI: This port is used to connect your BeagleBone Black to a computer display or a television set.

· Serial header: The BeagleBone Black has a separate header for one of its serial ports, enabling you to easily connect a USB-to-TTL serial cable (read Chapter 3 for more on this topic).

· Power button: If you press the power button, the board shuts down after a few seconds. You can turn it ON once more by pressing the power button again. You can also do a full power cycle by pressing the board for about 10 seconds; the board turns OFF and then comes back ON. You should avoid this, though, as it may corrupt the eMMC or SD card. Use it only if your board is not responding to your commands.

· User boot button: By default, your BeagleBone Black boots from onboard memory with the operating system (OS) installed there. By holding down this button when you power the board, you indicate that you want it to boot from the microSD card. You also use this button to install an operating system on the eMMC.

remember If you’re buying a BeagleBone now, it’s very unlikely that you’ll find an Original BeagleBone.

tip You can find all the boards available if you visit At the bottom of the page, you also see a table that compares the features of the boards. Additionally, at that same link you can find distributors all around the world that have the BeagleBone Black (and perhaps the other boards) available for purchase.

Original BeagleBone and BeagleBone Black interfaces

If you’re an advanced user, knowing the supported interfaces is often quite important, so they’re listed here. If the following list makes no sense to you, don’t worry; the book covers some of these concepts. For now, the important thing to know is that both the Original BeagleBone and the BeagleBone Black support a huge number of different interfaces, enabling you to connect with most devices and components.

The following list includes interfaces featured on both boards:

· 4x UART

· 8x PWM



· MMC1

· 2x SPI

· 2x I2C

· A/D converter

· 2x CAN

· Bus

· 4 timers

Additionally, the Original BeagleBone features two other interfaces:

· FTDI USB to serial

· JTAG via USB

Discovering the BeagleBoard and BeagleBoard-xM

The BeagleBoard appeared on the scene in 2008. The BeagleBoard xM showed up two years later. These two boards differ somewhat from the BeagleBone Black and the Original BeagleBone, so this book wasn’t written with support for these platforms in mind.

Despite being older, these boards still offer a lot of capabilities and may even be advantageous for some very specific, high-end projects. For hobbyists, however, the BeagleBone Black is hands down the best option due to its reduced cost and great versatility. Also, it’s a much better tool to use to get initiated in electronics and computation.

Exploring Uses for the BeagleBone

The BeagleBone is one of the best tools to use to discover programming and electronics. It’s also a good way to see and understand more closely how a computer works. Throughout this book, you explore some of the many capabilities that this board offers.

You can create electronics projects, for example, by using BoneScript (see Chapters 7 and 8) and Python (see Chapters 9 and 10). You can use the BeagleBone to build a web page (see Chapter 13) and to run a home automation webserver (see Chapter 15). You can build projects to automatically access your email, notify you when a new one arrives and display it on an external screen (see Chapter 14).

You can control your BeagleBone remotely with the Linux terminal (see Chapter 4) and even set up the BeagleBone Black as a desktop computer (see Chapter 12). For such a low-cost device, the variety of uses for the BeagleBone is nothing short of amazing. And all these ideas are just scratching the surface. Just as a beagle is often a person’s best friend, so is your imagination when it comes to playing around with the BeagleBone.

Accessorizing Your BeagleBone

Digital Electronics can quickly become an expensive hobby, but to get started, you need to spend only a few bucks on a BeagleBone Black. With a BeagleBone Black and a Mini USB cable, you have everything you need to create your first project: making the onboard LEDs blink. Don’t feel overwhelmed by all the accessories listed in this section, because you don’t need all of them right out of the gate. You may find that you already have most of these accessories on hand, so you may need to purchase only some of the accessories to complete our projects.

Here’s a list of all the accessories you may need for the projects covered in this book:

· USB A-to-Mini B cable: The BeagleBone comes with one Mini USB cable. This cable not only powers up your BeagleBone, but also enables you to connect your BeagleBone to your computer. (Read more about this topic in Chapter 3.)

· microSD card: The Original BeagleBone doesn’t have any kind of internal memory, so you need a microSD card to install and run the operating system; the Original BeagleBone already comes with a microSD card. On the other hand, the BeagleBone Black Rev A and B have 2GB of built-in memory, and Rev C has 4GB. The operating system can be run on the built-in memory and so these boards don’t include a microSD card in their standard package

tip You must have a microSD card to install a new operating system or to update the existing one, however. We recommend that you get a branded microSD card with at least 4GB of storage for your BeagleBone Black.

· microSD card adapter and writer: Most computers have a slot for SD cards, so you can insert your microSD card into a microSD card adapter (see Figure 1-3) and connect it to your computer. If your computer doesn’t have an SD card slot, you might consider buying an SD card writer.


Figure 1-3: A microSD card, microSD card adapter, and external SD card writer.

tip There are many different types of microSD cards and SD card writers. Generally, their prices are based on the speed at which data is written on them. We recommend that you go for branded versions of both the writer and the card, and that you get at least a class 4 microSD card.

· Ethernet cable: Connecting your BeagleBone to your router with an Ethernet cable enables you to install and update software; additionally, the BeagleBone is a great platform to create Internet-related projects. It also provides you an extra way to control your BeagleBone remotely. (Read more about this topic in Chapter 3.)

· 5V DC power supply: The BeagleBone can be powered up with a Mini USB cable by just being connected to your computer, but if you want to use your BeagleBone at maximum performance, capability, and featuring lots of USB peripherals — and/or for portable applications — we recommend that you use the 5V barrel connector. The power adapter that’s required needs to provide 5V over a 5.5mm outer diameter and 2.1mm inner diameter. It must supply a minimum of 500 mA to power up your BeagleBone.

tip A USB connection provides either 500 mA or 900 mA of current (depending on whether it is USB 2.0 or USB 3.0). This is generally enough to have a BeagleBone connected through Ethernet and powering several electrical components. However, if you connect many USB peripherals, you are advised to go for an external 1.2A to 2A power supply.

· Display: Most displays with an HDMI output work with the BeagleBone Black. You can also buy an LCD cape that’s specially designed to act as a display (see Chapter 6).

remember Not all displays are compatible with the BeagleBone Black. Make sure that you carefully read the sidebar at the end of this chapter to find out more about compatible accessories.

The Original BeagleBone doesn’t have a built-in Micro HDMI port. Worry not, though: You can still output image and sound with an LCD cape.

· HDMI-to-Micro HDMI cable: If you have a BeagleBone Black with an HDMI-to-Micro HDMI cable, you can output video and sound to a display (see Figure 1-4).

· USB keyboard and mouse: Most standard USB keyboards and mice are compatible with the BeagleBone. Keep in mind, though, that the board has only a single USB host port, so you have to connect a USB hub if you want to add more than one peripheral (see Figure 1-4).


Figure 1-4: BeagleBone Black as a desktop computer, connected to a display, a mouse, and a keyboard.

· USB hub: The USB hub enables you to expand the number of USB ports on your BeagleBone. This accessory is essential if you want to have multiple peripherals connected at the same time (see Figure 1-4).

· USB-to-TTL serial cable: If you have a BeagleBone Black, this cable could be useful to debug your BeagleBone Black during the booting process.

tip The Original BeagleBone has this feature built in, so you don’t need the extra cable.

· Other cables: If your display doesn’t have an HDMI output, you may be able to use a Micro HDMI-to-VGA or Micro HDMI-to-DVI converter. That way, you can repurpose your old desktop display.

warning Using converters for the Micro HDMI adds a whole other layer of incompatibilities. We recommend that you check our sidebar at the end of this chapter.

· Case: The BeagleBone arrives without a case, and some people actually prefer that look and feel, but it’s important that your board stay away from static electricity, conductive metal, and liquids. It’s a piece of electronics, after all. The best way to protect your BeagleBone is with a case.

· Breadboard: Using a solderless breadboard is the best way to prototype. It’s really easy to use, as it doesn’t require any soldering. That means that you don’t make any permanent connections and can easily modify your circuit at any time.

· Multimeter: A multimeter is a useful device that measures many things related to electricity.

· Soldering iron: Solder is a metal that liquefies easily when heat is applied to it and quickly goes solid again the moment it’s exposed to air temperature. A soldering iron is used to melt solder to establish permanent metallic connections.

· Other components: Some projects in this book use extra components such as LEDs, servos, motion sensors, and electrical wires. You don’t need to get anything right away; we tell you when the time is right.

tip Compatible accessories for the BeagleBone Black

If you’re looking for additional information regarding compatible accessories for your BeagleBone Black, visit

Note: The accessories listed on that web page aren’t the only compatible accessories that exist, but the ones that are listed have been verified to work with the BeagleBone Black. If your accessory is not working properly, but you find its name on that list, then you can be sure that the problem is not an incompatibility, and you can continue to troubleshoot.