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

C/C++

Most Banana Pro programs found on the Internet are C/C++ programs. The main reasons for this are speed critical applications: interpreters, such as Python, are much slower compared to compiled programs such as C/C++ ones. In this section, we will have a closer look at the Linux C/C++ compiler called GNU Compiler Collection (GCC). GCC includes frontends for both the C and C++ compiler as well as libraries for these languages. We install the C and C++ compiler with the following command:

sudo apt-get install gcc g++ make

Additionally, we install make, a utility that helps the compiling and linking of C/C++ files. We again start with a very simply "Hello world!" example, which we call hello.c:

nano hello.c

We can then add the following content:

#include <stdio.h>

int main(void)
{
    puts("Hello world!");
    return 0;
}

In the preceding example, we include standard input/output headers (stdio.h). The main entry point of the program has no arguments (void) and...

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