BerryClip 6 LED Add-on Board Python For Raspberry Pi

BerryClip 6 LED Add-on Board Python For Raspberry Pi


BerryClip 6 LED Add-on Board Python For Raspberry Pi

The BerryClip is a simple, cheap and easy to use add-on board for the Raspberry Pi. It plugs directly onto the Pi’s GPIO header and provides 6 coloured LEDs, 1 Buzzer and 1 Switch.
It can be controlled using any programming language that can manipulate the GPIO pins.

Raspberry Pi Setup

Prepare Raspbian image using official download from

Boot Pi and login with default username and password (‘pi’ and ‘raspberry’)

You will now be located in the ‘pi’ user home directory (‘/home/pi/’).

Type the following commands pressing the Enter key at the end of each line :

mkdir berryclip
cd berryclip
tar -xvf master.tar.gz --strip 1
The above lines perform the following functions :
– Makes a new directory called ‘berryclip’
– Navigates into that directory
– Grabs an archive of all the files from the BitBucket.prg website
– Extracts the files to your Pi

The script will download an instruction file and a set of example Python scripts.

To list the downloaded files type :

ls -l
You can use the following command to remove the gz archive as we don’t need that now we have extracted the files :

rm master.tar.gz
Run Some Example Python Scripts

The following example Python scripts are available : – Test LEDs only – Test Buzzer only – Test Switch only – Test LEDs and Switch – Test LEDs, Buzzer and Switch – LED sequence – Dice Simulator – Reaction time game – Random LEDs – Multiple LED sequences in a loop – Traffic light simulator – Morse code generator
To run a script you can use the following command :

sudo python
To quit a running Python script use [CTRL-C].

To view a text file or Python script you can use the command :


Other Useful Linux Commands

To list the files in the current directory in columns use :

ls -l
To edit a script use :

to save changes and quit use [CTRL-X], then [Y] then [ENTER]

To copy a script to a new filename use :

To reboot the Pi :

sudo reboot
To shutdown the Pi :

sudo halt
and wait for the lights on the Pi to stop changing (usually about 20 seconds) before removing the power cable.

If you are using Putty on another computer to access your Pi over a network without a monitor attached you can cut-n-paste these commands. Select the command, copy and use a right-mouse click in Putty to insert the command onto the command line.

Other Programming Languages

This page refers to the example Python scripts but it is possible to control the BerryClip using any programming that can control the GPIO Pins.

Carl Hughes has written a great article about using the BerryClip with Java.
Raspberry Pi, the BerryClip and Java

Hardware Reference

The following list shows the mapping between the components, the header pins and the GPIO references :

LED 1  - Pin 7  - GPIO4
LED 2  - Pin 11 - GPIO17
LED 3  - Pin 15 - GPIO22
LED 4  - Pin 19 - GPIO10
LED 5  - Pin 21 - GPIO9
LED 6  - Pin 23 - GPIO11
Buzzer - Pin 24 - GPIO8
Switch - Pin 26 - GPIO7

Write a review

Note: HTML is not translated!
    Bad           Good

Express Checkout

includes GST

Price includes GST

  • Views: 243905
  • Product Code: BerryClip 6 LED Add-on Board Python For Raspberry Pi
  • Availability: In Stock
  • AUD $18.95

Tags: BerryClip 6 LED Add-on Board Python For Raspberry Pi