BeagleBone For Dummies

Book description

The definitive, easy-to-use guide to the popular BeagleBone board

BeagleBone For Dummies is the definitive beginner's guide to using the popular BeagleBone board to learn electronics and programming. Unlike other books that require previous knowledge of electronics, Linux, and Python, this one assumes you know nothing at all, and guides you step-by-step throughout the process of getting acquainted with your BeagleBone Original or BeagleBone Black. You'll learn how to get set up, use the software, build the hardware, and code your projects, with plenty of examples to walk you through the process. You'll move carefully through your first BeagleBone project, then get ideas for branching out from there to create even better, more advanced programs.

The BeagleBone is a tiny computer board – about the size of a credit card – that has all the capability of a desktop. Its affordability and ease of use has made it popular among hobbyists, hardware enthusiasts, and programmers alike, and it's time for you to join their ranks as you officially dive into the world of microcomputers. This book removes the guesswork from using the popular BeagleBone board and shows you how to get up and running in no time.

  • Download the operating system and connect your BeagleBone
  • Learn to navigate the desktop environment
  • Start programming with Python and Bonescript
  • Build your first project, and find plans for many more

To learn BeagleBone, you could spend hours on the Internet and still never find the information you need, or you can get everything you need here. This book appeals to all new and inexperienced hobbyists, tinkerers, electronics gurus, hackers, budding programmers, engineers, and hardware geeks who want to learn how to get the most out of their powerful BeagleBone.

Table of contents

    1. Introduction
      1. About This Book
      2. Foolish Assumptions
      3. Icons Used in This Book
      4. Beyond the Book
      5. Where to Go from Here
    2. Part I: Getting Started with the BeagleBone
      1. Chapter 1: Introducing the BeagleBone
        1. Touring the Original BeagleBone and the BeagleBone Black
        2. Exploring Uses for the BeagleBone
        3. Accessorizing Your BeagleBone
      2. Chapter 2: Installing the Operating System
        1. Introducing Linux
        2. Selecting a Distribution
          1. Knowing the factory defaults on your BeagleBone
          2. Downloading your Linux distribution
          3. Decompressing your Linux distribution
        3. Flashing and Inserting Your microSD Card
          1. Flashing a microSD card in Windows
          2. Flashing a microSD card in Mac OS X
          3. Flashing a microSD card in Linux
          4. Inserting your microSD card
        4. Flashing the Onboard eMMC
      3. Chapter 3: Connecting Your BeagleBone
        1. Connecting via USB
          1. Installing drivers
          2. Browsing to your BeagleBone
        2. Blinking the onboard LEDs
        3. Connecting via SSH over USB
          1. Windows
          2. Mac OS X and Linux
        4. Connecting via SSH over Ethernet
          1. Windows
          2. Mac OS X and Linux
        5. Connecting the Original BeagleBone via Serial over USB
          1. Windows
          2. Mac OS X and Linux
        6. Connecting the BeagleBone Black via Serial over USB
          1. Windows
          2. Mac OS X and Linux
    3. Part II: Covering the Basics
      1. Chapter 4: Introducing the Linux Shell
        1. Examining the Prompt
        2. Introducing the root superuser
        3. Exploring the Linux File System
          1. Listing files and directories
          2. Understanding the directory tree
          3. Changing directories
          4. Understanding relative and absolute paths
          5. Checking file types
          6. Creating directories
          7. Creating, editing, and viewing text files
          8. Removing files and directories
          9. Copying and renaming files
          10. Selecting multiple files in Linux
          11. Using long-listing format and permissions
        4. Managing Software on Your BeagleBone
          1. Installing software
          2. Running software
          3. Updating software
          4. Removing software
          5. Seeing what’s installed on your BeagleBone
        5. Changing the Hostname and Password
        6. Shutting Down and Rebooting
        7. Commanding the Prompt Like a Jedi Master
          1. Recalling previous commands
          2. Autocompleting commands
          3. Using keyboard shortcuts
          4. Keeping everything clean
      2. Chapter 5: Designing Circuits
        1. Introducing Electricity
          1. Voltage, current, and resistance
          2. The water analogy
          3. A basic circuit example
        2. Examining the Equations
          1. Ohm’s Law
          2. Power calculations
          3. Joule’s Law
          4. Units of measurement
        3. Working with Circuits
          1. Circuit diagrams
          2. Color coding
          3. Resistor color charts
          4. Datasheets
      3. Chapter 6: Introducing Digital Electronics with the BeagleBone
        1. Looking for the Right Tools
          1. Breadboards
          2. Jumper wires
        2. Essential Components and Parts
        3. Getting to Know the GPIO
        4. Understanding How GPIOs Work
          1. Viewing the GPIO pins layout
        5. Setting GPIOs as Outputs
          1. Wiring the circuit for an LED
          2. Controlling the GPIO
        6. Setting GPIOs as Inputs
          1. Wiring the circuit for a pushbutton
          2. Controlling the GPIO
        7. Setting GPIOs as PWM
          1. Wiring the circuit for a brightness-regulated LED
          2. Controlling the GPIO
        8. Creating shell scripts
        9. Adding Capes to the BeagleBone
          1. BeagleBone Proto Cape
          2. BeagleBone Power Cape
          3. BeagleBone Motor Cape
          4. BeagleBone mikroBUS Cape
          5. BeagleBone GPS/GPRS Cape
          6. BeagleBone LCD Cape
          7. BeagleBone HD Camera Cape
    4. Part III: Programming with BoneScript
      1. Chapter 7: Introducing BoneScript
        1. Introducing JavaScript, Node.js, and BoneScript
        2. Introducing Cloud9 IDE
        3. Launching the Cloud9 IDE
          1. Exploring the Cloud9 IDE
          2. Creating a folder and .js file
        4. Blinking an Onboard LED with BoneScript
          1. Commenting
          2. Loading the BoneScript module
          3. Creating variables
          4. Configuring pins
          5. Setting the default pin state
          6. Setting an interval
          7. Creating a function
          8. Running the script
        5. Blinking More LEDs with BoneScript
          1. Wiring the circuit
          2. Opening the blinked.js demo
          3. Running the script
      2. Chapter 8: Experimenting with BoneScript
        1. Reading an Input
          1. Wiring a pushbutton
          2. Writing the code to read the state of a pushbutton
          3. Running the script to read the state of a pushbutton
        2. Controlling an LED with a Pushbutton
          1. Wiring an LED and a pushbutton
          2. Writing the code
          3. Running the script
        3. Adjusting the Brightness with an RGB LED
          1. Wiring the RGB LED
          2. Writing the code
          3. Running the script
        4. Sweeping a Servo with a Potentiometer
          1. Analog inputs
          2. Wiring everything together
          3. Writing the code to sweep a servo with a potentiometer
          4. Running the script to sweep a servo with a potentiometer
        5. Detecting Movement with a Motion Sensor
          1. Wiring the motion sensor
          2. Writing the code for motion detection
          3. Running the script for motion detection
    5. Part IV: Programming with Python
      1. Chapter 9: Introducing Python
        1. Getting Started with Python
          1. Making sure your libraries are up to date
          2. Installing the libraries
        2. Blinking an LED with Python
          1. Wiring the circuit for an LED
          2. Writing the code for an LED
          3. Running the script for blinking an LED
        3. Reading a Pushbutton with Python
          1. Wiring the circuit for a pushbutton
          2. Writing the code and running the script for a pushbutton
          3. Writing the code with interrupts
          4. Introducing if . . . else and if . . . elif statements
          5. Getting to know the print function
      2. Chapter 10: Experimenting with Python
        1. Fading an RGB LED with Python
          1. Wiring an RGB LED
          2. Writing the code for fading an RGB LED
          3. Running the script for fading an RGB LED
        2. Working with Analog Sensors
          1. Using the right voltage for the ADC
          2. Wiring an IR distance sensor
          3. Writing the code to measure distance
          4. Running the script to measure distance
          5. Wiring a temperature sensor
          6. Writing the code to read temperature
          7. Running the script to read temperature
        3. Sending an Email with Python
          1. Knowing the prerequisites
          2. Writing the code to send an email
          3. Running the script to send an email
        4. Mixing Up Projects and Creating Functions
          1. Creating a function with Python
          2. Sending temperature readings by email
          3. Controlling an RGB LED with distance readings
        5. Introducing UART
          1. Wiring the BeagleBone to an UART device
          2. Writing the code to test UART
          3. Running the script to test UART
          4. Understanding UART's uses
      3. Chapter 11: Mastering the Art of Coding
        1. General Programming Tips
          1. Variables and function names
          2. Constants
          3. Comments, white space, and indentation
        2. Debugging
        3. Diving into Binary and Data Storage
          1. Binary
          2. Hexadecimal
          3. Data storage
        4. BoneScript-Specific Programming Tips
          1. Looping, looping, and more looping
          2. Understanding the importance of JavaScript callbacks
        5. Python-Specific Programming Tips
          1. Creating functions to clear up the mess
          2. Creating time-dependent code
    6. Part V: Turning Your BeagleBone into a Desktop Computer
      1. Chapter 12: Using Your BeagleBone Black as a Desktop Computer
        1. Getting Started
        2. Connecting the Peripherals and Booting Up
          1. Connecting a Micro HDMI cable or DVI display
          2. Connecting a USB hub, keyboard, and mouse
          3. Connecting to your router
          4. Connecting the power
          5. Booting up
        3. Accessing the Terminal
        4. Roaming the Desktop Environment
          1. Viewing the Applications menu
          2. Using the task bar
          3. Working with multiple desktops
        5. Customizing the BeagleBone
          1. Customizing the desktop appearance
          2. Choosing a screen saver
          3. Creating icons on the desktop
          4. Changing the desktop background
        6. Using the File Manager
          1. Navigating the File Manager
          2. Creating blank files
          3. Creating new folders
          4. Opening a folder in the terminal
          5. Accessing external storage devices
        7. Using the Task Manager
        8. Browsing the Web
          1. Using the Customization menu
          2. Searching for web pages
          3. Finding words within web pages
          4. Using tabbed browsing
          5. Adding and using bookmarks
          6. Changing settings
        9. Shutting Down, Rebooting, and Logging Off
      2. Chapter 13: Building Your Website
        1. Introducing HTML, CSS, and JavaScript
        2. Getting Started
          1. Using a BeagleBone Black as a desktop computer
          2. Controlling the BeagleBone remotely through SSH
        3. Creating Your First Website
          1. Organizing your files
          2. Opening a new file
          3. Writing the first line
          4. Structuring an HTML document
        4. Formatting Your HTML Content
          1. Adding a title
          2. Adding headings
          3. Inserting paragraphs
          4. Viewing your web page
          5. Inserting links
          6. Adding images
          7. Creating lists
        5. Formatting Your HTML Document
        6. Styling Your HTML Content with CSS
          1. Embedding a style sheet
          2. Knowing the basics of CSS
          3. Experimenting with colors
          4. Changing text appearance
          5. Understanding the box model
        7. Styling Your HTML Elements
          1. Wrapping up your content
          2. Dividing your web page
          3. Customizing your logo and navigation bar
          4. Customizing your container
          5. Testing your web page
        8. Publishing Your First Website
    7. Part VI: Playing with the BeagleBone
      1. Chapter 14: Building Your First Project
        1. Getting Started
        2. Wiring Up the LCD
          1. Wiring the LCD
          2. Writing the code for the LCD
          3. Running the script for the LCD
        3. Programming the Email Reader
        4. Putting It All Together
          1. Wiring the pushbuttons
          2. Understanding the concept
          3. Writing the code
        5. Adding the LED and Buzzer
          1. Wiring the LED and buzzer
          2. Writing the code for the LED and buzzer
          3. Running the script of the complete project
      2. Chapter 15: Running Your Home Automation Web Server
        1. Exploring What You Can Do
        2. Examining the Framework
          1. Installing socket.io
          2. Keeping your files organized
          3. Repurposing your previous HTML and CSS
        3. Wiring Your Circuit
        4. Writing Your Web Page
          1. Creating your GUI
          2. Adding JavaScript to your web page
          3. Explaining your main JavaScript
        5. Running Your Web Server
          1. Loading modules and initializing a variable
          2. Creating your web server
          3. Establishing socket communication
          4. Launching your web server
        6. Accessing Your BeagleBone with Another Device
        7. Dropping Your LED and Controlling an Appliance
        8. Adjusting Outputs with PWM
          1. Designing the GUI
          2. Writing your main script
          3. Creating your web server
          4. Launching the web server to control a PWM output
        9. Connecting a temperature sensor
          1. Writing your web page
          2. Creating your web server
          3. Launching the web server for your temperature monitoring
    8. Part VII: The Part of Tens
      1. Chapter 16: Ten Amazing Projects for the BeagleBone
        1. Underwater Exploration Robot
        2. Autonomous Sailboat to Tame the Seas
        3. Autonomous Robot for BeagleBone Black
        4. BoneScript
        5. Multimedia Center with Kodi
        6. BeagleBone Gaming Console
        7. BeagleBone As Super Nintendo
        8. BeagleBone Cape for Drones
        9. Desktop Five-Axis CNC Mill
        10. BeagleBone 3D Printer
      2. Chapter 17: Ten Resources and Tips for BeagleBone Users
        1. Finding Components and Parts
        2. Acquiring Electronics Starter Kits
        3. Protecting Your BeagleBone with a Case
        4. Attending Events and Workshops
        5. Joining the BeagleBoard Community
        6. Interacting with the Community
        7. Sharing Your BeagleBone Projects with Others
        8. Improving by Failing
        9. Looking for Project Ideas
        10. Finding Out More about BeagleBone
    9. Appendix A: Troubleshooting
      1. Common Sources of Errors
      2. Things Not to Do
      3. Miscellaneous
        1. Expanding the file system on your microSD card
        2. Accessing external storage devices when using the Linux Shell
    10. Appendix B: Controlling BeagleBone’s GPIOs
      1. Controlling the GPIO with the File System
      2. Controlling the GPIO with BoneScript
      3. Controlling the GPIO with Python
    11. Appendix C: Guide to the BeagleBone’s GPIOs
    12. About the Authors
    13. Cheat Sheet

Product information

  • Title: BeagleBone For Dummies
  • Author(s): Rui Santos, Luís Miguel Costa Perestrelo
  • Release date: February 2015
  • Publisher(s): For Dummies
  • ISBN: 9781118992913