Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Banana Pro Blueprints
  • Toc
  • feedback
Banana Pro Blueprints

Banana Pro Blueprints

By : Ruediger Follmann, Tony Zhang
5 (3)
close
Banana Pro Blueprints

Banana Pro Blueprints

5 (3)
By: Ruediger Follmann, Tony Zhang

Overview of this book

This book follows a tactical plan that will guide you through the implementation of Banana Pro and its configurations. You will then learn the various programming languages used with Banana Pi with the help of examples. In no time at all, you’ll be working on a wireless project that implements AirPlay servers, hotspots, and so on. Following this, you’ll develop a retro-style arcade kiosk game. Then we’ll move on to explore the multimedia features of Banana Pro by designing and building an enclosure for it. After this, you’ll learn to build a remote-controlled smart car and we’ll examine how to control a robotic arm. The book will conclude with the creation of a home sensor system that has the ability to expand or shrink to suit any home.
Table of Contents (10 chapters)
close
9
Index

Shell programming

A Linux shell is a command line interpreter that provides a user interface for a system itself. It can be used to install programs (apt-get install) or even for some programming, including conditions, logic, or loops. Linux provides many different shells. Very often, the Bourne shell is used, which was developed in the 70s by Stephen R. Bourne. This shell provides input and output redirection, pipes, background processes, and much more. For all Linux systems, a Bourne-compatible shell in the /bin/sh directory is available.

Checking the Banana Pro temperature

Let's start our first shell program using these steps:

  1. Edit a file called temperature and place the following content in it:
    #!/bin/sh
    cat /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input
    
  2. Save the file afterwards and make it executable:
    chmod 775 temperature
    
  3. Execute this file by typing this:
    ./temperature
    

My output shows 36200, which is the Banana Pro temperature multiplied by 1,000. The first line of the...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete