O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning Banana Pi

Book Description

Unleash the power of Banana Pi and use it for home automation, games, and various practical applications

  • Using Banana Pi, learn how to install and build basic projects from start to end
  • Learn all the fundamentals and uses of Banana Pi to build projects in a short amount of time
  • A step-by-step practical guide that teaches you how to get up and start running with Banana Pi to start working on your own projects

In Detail

Banana Pi is a small but powerful ARM board that can run on multiple operating systems. Banana Pi has been adopted by tech-savvy enthusiasts and hobbyists to develop their projects.

This book will take you from opening your Banana Pi's box for the first time all the way to working with hardware and code. We will explore the different configuration options and operating system choices. You'll proceed to working with Banana Pi hooked up to a breadboard and connecting hardware components such as LEDs and motors to the board. Further, you'll build an Internet radio working with an LCD display, interacting with user input, and streaming audio over the Internet. This book also acquaints you with another really popular use of Banana Pi, home servers. Finally, you'll realize the power of the robust hardware of Banana Pi by playing games on Android and Linux.

By the end of this book, you should be familiar with the basics of development using Banana Pi, from installation to building basic projects.

What You Will Learn

  • Get started with single-board computing by diving deep into the operating system and hardware of Banana Pi
  • Interact with the GPIO pins from scripts and code to start programming on the board
  • Connect hardware components to the GPIO pins and control them directly from Banana Pi
  • Connect Banana Pi devices with your home network to download packages from the Internet
  • Link your Banana Pi remotely with other computers via SSH to run as a headless device
  • Work with the onboard IR receiver of Banana Pi as well as connect external sensors and interact with them through their code
  • Build an Internet radio powered by Banana Pi to stream podcasts and music
  • Build and run a home server using Banana Pi to sync files, calendars, and contacts

Table of Contents

  1. Learning Banana Pi
    1. Table of Contents
    2. Learning Banana Pi
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the color images of this book
        2. Errata
        3. Piracy
        4. Questions
    8. 1. An Overview of the Banana Pi
      1. Differences between the Raspberry Pi and Banana Pi
      2. The M1
      3. The M2
      4. GPIO pins
      5. CON3 GPIO pin definitions
      6. Operating systems
      7. Raspberry Pi accessories
      8. Getting started
      9. Setting up your environment
      10. Powering the boards
      11. Summary
    9. 2. Preparing the SD Card
      1. Getting the SD card ready
        1. Prepping the SD card on Windows
        2. Prepping the SD card on Linux
          1. Preparing the drive from the command line
          2. Preparing your drive using GParted
        3. Prepping the SD card on the Mac
      2. Installing the operating system
        1. Installing Android
        2. Installing Linux on your Banana Pi
          1. Installing through Windows
          2. Installing on the Mac and Linux
      3. Configuring your Linux installation
        1. Setting up Raspbian
        2. Setting up Bananian
        3. Expanding the root partition
      4. Connecting remotely
        1. SSH from Windows
        2. SSH from Linux or the Mac
        3. SSH remotely
      5. Setting up your desktop environment
      6. Summary
    10. 3. Linux and the Command Line
      1. The filesystem
      2. Important commands
      3. Installing software
        1. The Apt package manager
        2. The dpkg tool
      4. Interfacing with GPIO pins
        1. Interacting with the GPIO pins in Python
      5. Interacting with hardware
        1. Using expansion boards
        2. Setting up the PiFace
        3. Mounting external drives
      6. Summary
    11. 4. Programming on the Pi
      1. Choosing your editor
        1. Command-line editors
          1. The Emacs editor
          2. The Vim editor
          3. The nano editor
        2. Graphic editors
          1. Eclipse
          2. The Geany IDE
        3. Web IDEs
          1. Google Coder
          2. Adafruit WebIDE
      2. Writing code on the Pi
        1. Bash scripting
        2. Python programming
        3. The Ruby language
        4. The Go language
      3. Summary
    12. 5. Hardware for Your Pi
      1. Breadboarding your Banana Pi
        1. Required hardware
        2. Common components
          1. Resistors
          2. Diodes
          3. Light-emitting diodes
          4. Capacitors
          5. Transistors
          6. Integrated circuits
      2. Working with hardware
        1. Working with LEDs
          1. Controlling LEDs with code
          2. Adding user input
        2. Working with servos
        3. Controlling our servo
      3. Summary
    13. 6. Interacting with Sensors
      1. Sensors and you
      2. Interacting with light
      3. Using RFID
      4. Using IR receivers
      5. Using force sensors
      6. Summary
    14. 7. Building an Internet Radio
      1. Setting up the music
      2. Using LCD displays
      3. Wiring up the LCD
        1. Connecting the Pi
        2. Writing to the display
        3. Radio output
      4. Introducing the PiFace radio
        1. The PiFace radio
        2. Adding stations
      5. Making our radio pretty
      6. Summary
    15. 8. Building a Home Server
      1. Setting up a web server
        1. Setting up our server
      2. Setting up ownCloud
        1. Setting up the SATA drive
        2. Installing ownCloud
        3. Installing Baikal
        4. Downloading Baikal
        5. Setting up swap
      3. Summary
    16. 9. Gaming on Your Pi
      1. Gaming on Android
      2. Gaming on Linux
      3. EmulationStation
      4. Streaming from your PC
      5. Summary
    17. Index