Reader small image

You're reading from  Banana Pi Cookbook

Product typeBook
Published inJun 2015
Publisher
ISBN-139781783552443
Edition1st Edition
Right arrow
Author (1)
Ryad El-Dajani
Ryad El-Dajani
author image
Ryad El-Dajani

Ryad El-Dajani is a software engineer and passionate technology enthusiast. He developed an interest in computers when he was 10 years old. Soon thereafter, he began to learn his first programming languages. After he had completed his training as an IT specialist, he worked on several e-commerce Internet projects. Currently, he is studying business computing and works for a big IT company in Germany, realizing various IT projects based on Java or .NET technologies. Besides the classic application development, he has professional experience in realizing projects based on web frameworks such as Spring, Play, Symfony, eZ Publish, and Magento. Moreover, he has been excited about all kinds of Unix-like embedded systems since the revolutionary SheevaPlug.
Read more about Ryad El-Dajani

Right arrow

Lighting up an LED using the gpio command


This recipe is the "Hello World"equivalent of electrical experiments with a single-board computer. We will connect an LED to a GPIO pin of the Banana Pi and apply a logical high signal on that pin. This will enlighten the LED.

Getting ready

We require several components to switch on an LED on the Banana Pi:

  • A Linux system on the Banana Pi

  • Access to the shell

  • A 5mm LED (forward voltage 2.0 V)

  • A 470 Ω resistor

  • A breadboard

  • Two female to male jumper wires

You can conveniently purchase these components at retailers that specialize in electronics. Most of the components in this and the upcoming recipes are available for a low price.

How to do it…

The following steps will switch on an LED. You will find the complete Banana Pi and Banana Pro pin layout in the There's more... section of this recipe.

Tip

Before you connect or disconnect any electrical parts, power off your Banana Pi and also unplug the power supply.

  1. Connect the first jumper wire to the GPIO 1 pin. That...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Banana Pi Cookbook
Published in: Jun 2015Publisher: ISBN-13: 9781783552443

Author (1)

author image
Ryad El-Dajani

Ryad El-Dajani is a software engineer and passionate technology enthusiast. He developed an interest in computers when he was 10 years old. Soon thereafter, he began to learn his first programming languages. After he had completed his training as an IT specialist, he worked on several e-commerce Internet projects. Currently, he is studying business computing and works for a big IT company in Germany, realizing various IT projects based on Java or .NET technologies. Besides the classic application development, he has professional experience in realizing projects based on web frameworks such as Spring, Play, Symfony, eZ Publish, and Magento. Moreover, he has been excited about all kinds of Unix-like embedded systems since the revolutionary SheevaPlug.
Read more about Ryad El-Dajani