O'Reilly logo

Banana Pi Cookbook by Ryad El-Dajani

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

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 ...

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

Start Free Trial

No credit card required