Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

PiBorg's TroPi

Getting Started:


The TroPi adds a row of 5 programmable LEDs to your Raspberry Pi projects and you can also build you very own light up Trophy display using the additional Trophy kit.

Here you'll find the driver code, and a handful of examples to get you started.


Follow the Getting Started Guide for physical installation of the board, then use git clone to clone the TroPi repository locally and use the class within your projects. This will also give you this README and the example scripts showing how to use the TroPi class.


There are three examples available in this repository:

  • - Runs Cheerlights on the TroPi. Try running this script using python then Tweet using the #Cheerlights hash tag and a colour eg. Tweeting "#Cheerlights Red" will change the TroPi lights to Red.
  • - Smoothly changes colours of the TroPi LEDs through the rainbow of colours in a wave from the first LED to the last.
  • - Flashing lights as if you've been caught by the Fuzz.
  • - Asks the user "which light would you like to turn on?". Give a number from 0 to 4 and watch the light come on.


There are a few useful callable functions inside the TroPi class:

  • SetEachColour(colours) - Provide a list of colours to set each light, see for an example of usage.
  • SetAllColours(red, green, blue) - Set all LEDs to the given RGB value eg. SetAllColours(1.0, 0.0, 0.0) would set all the lights to red.
  • SetSingleColour(ledNumber, red, green, blue) - Set a given LED to a colour eg. SetSingleColour(2, 1.0, 0.0, 0.0) would set the middle LED to red.

Further Help

Head over to the PiBorg Forum and ask for questions if you need further help.


Repository for the TroPi module/class and examples.



No releases published


No packages published


You can’t perform that action at this time.