Multi-Colour RGB LED Workshop Follow-up

Posted: April 22, 2013 in General, News, Raspberry Pi, RGB-LED Kit

Multi-Colour LED Workshop Follow-Up

The Multi-Colour RGB LED kit connected to a Raspberry Pi

This relates to the workshop which was held on 20th April 2013:

Raspberry Pi @Bristol Boot Camp

Early Saturday morning, ready for the workshop!

Early Saturday morning, ready for the workshop!


First a big thanks to BCS (British Computing Society), @Bristol, and Bristol University for organising the event.  Big thank you for everyone who turned up for the event (I’ve no idea of the actual numbers, but over 200+ at least throughout the day).

A special thank you for my wife, who worked just as hard as me preparing for the workshop (she was clipping LED legs into the early hours), and also to my brother who was kind enough to help out on the day (despite never having held a Raspberry Pi before let alone used one).

An extra thank you to the people who attended my workshop!  You were all very patient and keen, an excellent combination.

As far as I am aware, everyone had a great time.  The whole place had a real buzz of energy and excitement.

Fellow MagPi Colin Deady, setup and extensive MagPi stand and drop in clinic (yes with sweets! GENIUS).

Fellow MagPi Colin Deady, set up an extensive MagPi stand and drop in clinic (yes with sweets! GENIUS).

The workshop

It was my first workshop, and I had little idea of what to expect.

A major challenge of the workshop, was running it without any Keyboards and Monitors, so it was down to people either bringing their own (I did manage to get most working but this did detract from the workshop itself and took me away from helping people getting started with the workshop itself).  Everyone was great, and we managed to get most sorted out and running.

I loved running the workshop, some wonderful people and some exceptionally clever kids!  It really underlined to me, that if you provide the means and the information, they will take and run with it!

As it happens, I provided far more material than most were able to work through in the time available (although a few groups stayed and worked through it anyway).

One group even took it a stage further wiring the RGB-LEDs up to become a treasure detector in Minecraft!

Getting everything wired up!

Getting everything wired up!

Hardware Fault…

One very unexpected problem we had was the hardware itself, this was simply my own fault where I had not had time to test everything before hand (lots of very late nights all week preparing).

Somehow, I had got hold of the WRONG type of RGB-LED…the built modules were using Common-Anode RGB-LEDs, where the kits are normally Common-Cathode.

While this has no effect on the construction, or the wiring of the kits, it makes a difference when it comes to the software.  Fortunately, it is easily fixed as I always define the RGB-LED type at the top of the file:

#Setup Active states
#Common Cathode RGB-LEDs (Cathode=Active Low)

This underlines the advantages of not using magic numbers, since the only change required to use the Common-Anode RGB-LED is to change that code to the following:

#Setup Active states
#Common Anode RGB-LEDs (Anode=Active High)

Obviously, this is something I would have spotted if I hadn’t been so rushed, so big apologies for not spotting it sooner!  Some attendees even figured it out on their own, which was impressive.

I traced the source of the incorrect RGB-LEDs to the last pack of LEDs I used to make up some of the kits as well as most of the workshop modules (this mistake I have to admit may have been due to the late time of night I was doing it).


The good news is I’ve checked through my stock, and accounted for all the Common-Anode  RGB LEDs and I can confirm that none of the self solder kits were sold with Common-Anode RGB LEDs.  I’ve removed all the incorrect ones from stock too.


Another area which the workshop highlighted, is to provide more information for troubleshooting, and more pictures of expected results!

BASH Example – The LED does not light up the GREEN part of the RGB LED:

This is down to the pin difference on the GPIO for Rev1 and Rev2 boards (Model B) when using Bash (this isn’t an issue for Python).  Within the Bash script there is a pin value for LED_GREEN=$PIN13_REV2.  This should be changed to LED_GREEN=$PIN13_REV1 for the original Rev1 Model B (the one which doesn’t have mounting holes).  It is easy to forget that not everyone will know about the Rev1 and Rev2 difference.

BASH Example – The LEDs do not switch off (although the script is commanding them OFF)

This is down to having the other type of RGB-LED Common-Anode for the built Workshop units.  The LED type needs to be changed, or as we can see, commanding them OFF turns them ON!

Next time?

It was my first workshop, and taking on 20 people (target was 20 people in a workshop, with it running 4 times during the day) by myself was a big ambitious challenge, particularly when faced with running them all headless (the Raspberry Pi’s that is).

I’ve learnt a lot about what people found good, and lots of ways to improve the workshop next time.

– A key one will be less typing, something which is less important when writing guides (people can do it in their own time) but clearly more important when time is short (and not everyone particularly younger people touch-type).

– Keep it simple.  I probably had enough material for about 4 workshops!  It was great in that no-one run out of stuff to do, but it did mean that most did not get near to the end goal.  Coupled with the connections and hardware issues, it meant people didn’t get as far as they could have.

– Workshop worksheets worked great, as everyone worked at their own pace.  I would probably keep them, but continue to improve them.  Having sections which present challenges is also good, with solutions available on separate sheets / on-line.

– Have additional guides to cover things like the Remote Connection set-up (I intended to have this, but run out of time, plus I also expected to have at least SOME monitors and keyboards provided).

– Providing the source code was very useful!  I would probably aim to have the source code available again, provides a fall-back for cases where typos are not obvious or wiring issues are present (or in my case confirming issues with the hardware).  Although I would probably keep challenge solutions separated out (perhaps only available after the workshop).

– Have clear points where code should be run, and the expected out-come (I did start to do this but mainly in the later material I produced)

– Have plenty of material to choose from (as I do more workshops), I will build up a range of worksheets so that people can pick what parts they want to learn.

– Avoid having to deal with remote set-ups (either have a set period before hand to get people set-up, or have monitors and keyboards).

– Have demo’s running, so people can see each stage of the workshop goals.  This may also provide a neater way to hint at challenge solutions without giving the full answer (the code is available on the demo machine, so you can read it but remember the concept so you can apply it).

– Have more help.  Although I intended to run the workshop solo, I was lucky enough to have help from my brother.  This made a massive difference, although he didn’t have Raspberry Pi knowledge or of the workshop materials, he was able to help people get set-up and running while I was dealing with people.  Having additional helpers, would have meant I could have spent more time setting up demos and examples as well as resolving issues quicker.

– Get funded!  Sadly it cost me a lot to set up, and not having funds meant that I wasn’t able to provide a lot of things which I would have liked to.  Such as take away handouts, USB dongles with the workshop material on – making it easier to get onto the Raspberry Pi, spare kit such as RPis, SDCards etc, perhaps even bigger discounts on kit.  Unfortunately, it is not something selling the kits online can cover.

– Instead of running in formal time slots, the workshop ended up more informal, where people found a spare place and had a go, they continued working through the material as long as they wanted or needed to go to another workshop.

All round I think everyone learnt a lot, and I think it was a great first attempt at such an event.  Lots of notes have been taken to improve it and hopefully people will want to return and get even more out of it next time!

From the limited view-point I had (I didn’t leave my area except late in the afternoon when I had chance to grab a coffee to hold while helping) everyone was having an excellent day!

Of course if you did attend the workshop, then I would love to get more feedback (including what would you like covered next time).  

You can contact me directly via:

  1. Chris Reynolds says:

    Thanks for running the workshop and preparing the notes, it can’t have been fun soldering up all those kits. We soldered ours up yesterday and it worked first time – the instructions were great. Our LEDs were all common cathode. We’re busy now tarting up our minecraft treasure hunt game to use more features of the LEDs

    • Excellent, really glad you enjoyed the workshop. Was great fun running it, and looking forward to doing another one hopefully. Soldering the kits is always fun, just not ideal to have to do so many late at night.
      Hope you have found the code for the rainbow colours, for colour mixing – Lesson 1 Extra Credit.

      Oh and panic over about the Common-Anode RGB LEDs, I checked all the kits and re-counted them all, and accounted for all of them, which is a relief.

      • Chris Reynolds says:

        As I’ve got older my eyes struggle to see well enough to solder so I’m teaching my son who soldered up your board! I’m going to have a go at the colour mixing tonight, I may even consider trying to multi-thread so the colour switching is all done in one thread away from my main game loop. Never done threading before in Python, well before the Pi I’d never even touched Python so it’s all good.

      • Yep, a lesson using threading is on my list. It isn’t too bad, although seems to go hand in hand with python objects and classes.

    • carl says:

      Thanks for your help on Saturday, I have set my kit up and now using bash to light up my LEDs!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s