Warning : Watch out for counterfeit BerryClips. If you use a fake version of our board then please don’t ask why your Pi has stopped working. A black PCB usually means you’ve been sold a fake that is likely to destroy your Pi. Beware!

User Guide

We also have a user guide in PDF format which contains the same material as this page but may be easier for you to download and print or read on tablets and eBook readers.

Note 1: Take care to ensure the 1K and 10K resistors are placed in the correct positions.Note 2: Take a look at the photos to ensure you solder the 26 way header onto the correct side of the board.Note 3: The LEDs have a short leg (Cathode) and long leg (anode). Make sure the long leg is inserted into the hole nearest the P1 Header. The short leg should be inserted into the hole nearest the resistor.

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 :

berryclip_01.py – Test LEDs only

berryclip_02.py – Test Buzzer only

berryclip_03.py – Test Switch only

berryclip_04.py – Test LEDs and Switch

berryclip_05.py – Test LEDs, Buzzer and Switch

berryclip_06.py – LED sequence

berryclip_07.py – Dice Simulator

berryclip_08.py – Reaction time game

berryclip_09.py – Random LEDs

berryclip_10.py – Multiple LED sequences in a loop

berryclip_11.py – Traffic light simulator

berryclip_12.py – Morse code generator

To run a script you can use the following command :

sudo python berryclip_01.py

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

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

cat berryclip_01.py

Other Useful Linux Commands

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

ls -l

To edit a script use :

nano berryclip_01.py

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

To copy a script to a new filename use :

cp berryclip_01.py my_first_script.py

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.