Print this Page

Berry Clip

BerryClip 6 LED Add-on Board Instructions


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

Boot the Raspberry 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 in a terminal, pressing the Enter key at the end of each line :

mkdir berryclip
cd berryclip

The above lines perform the following functions :
– Make a new directory called ‘berryclip’
– Move into that directory
– Grab a script from the website
– Run the script

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

Type :

ls -l

to list the downloaded files.

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

Now plug the BerryClip onto the Raspberry Pi using the 26-pin GPIO header, such that the BerryClip will sit above the Raspberry Pi, as shown below:


To run a script you can use the following command :

sudo python

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

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

To save changes and quit use Ctrl+x then Y and ENTER

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


In case the buzzer is continuously biping once you attach the BerryClip onto the Raspberry Pi, it means that the Pi`s GPIO8 was left high from a previous application. In order to manually set it to low, install the wiringPi tool as per and then use the command:

gpio mode 10 in

This command will set the GPIO 10 according to the WiringPi (corresponding to GPIO8 on the Raspberry Pi) to low and will stop the annoying sound done by the BerryClip.

Permanent link to this article: