This recipe demonstrates how simple it is to access hardware from a Raspberry Pi.
In this recipe, an LED connected to one of the Raspberry Pi's GPIO pins is made to blink using simple Bash commands (ls
, cat
, and echo
).
After completing this recipe, you will be able to control the GPIO ports attached to your Raspberry Pi from the Bash command line.
Ingredients:
An Initial Setup or Basic Networking setup for the Raspberry Pi that is not powered on
An LED
A pushbutton switch
Three 330 Ohm resisters
A breadboard
A few breadboarding wires
This recipe does not require the desktop GUI and could either be run from the text-based console or from within an LXTerminal
.
If the Raspberry Pi's Secure Shell server is running, this recipe can be completed remotely using a Secure Shell client.