Meltwater’s RGB LED libraries lesson

Meltwater (of MagPi fame) has been working on some affordable teaching add-ons for the Pi. He’s demonstrating what you can do with one of his little kits with this natty tutorial where you’ll be creating your own Python library, and using it to do some low-level control of the GPIO. You’ll need one of his RGB LED kits if you want to be able to use your brand new library to play with making disco rainbows (Meltwater’s selling them for a very reasonable £14.49, and they’re a superb teaching tool) – but if you don’t have the kit you can still use the tutorial, with a little adaptation, for your own GPIO projects. And everybody should know about Python libraries, so if you don’t, get to it.

RGB LED teaching kit, with a rev1 Pi. Click to enlarge.

When you’ve worked through the tutorial, you’ll have learned how to use Python libraries, and you’ll be able to make (tiny) blinky disco lights in many colours. But Meltwater’s not doing all the work for you: there are further tasks in there for extra credit and a (pretend) gold star. For extra credit, you’ll be working out on your own how to make the LEDS output the first five colours of the rainbow, which, as any fule kno, are red and yellow and pink and green, orange…

These little teaching kits come with a useful manual too. Fancy sending us one for the demo table, Meltwater? :)

 

21 comments

Avatar

You said “as any fule kno” – I’m detecting (50) shades of Nigel Molesworth perhaps? Haven’t read that (How to be Topp) since primary skool – back in the late 60s early 70s.

God I’m old!

Cheers,
Norm.

Avatar

Whizz for Atomms! You have caught me, Sir, like a treen in a disabled spaceship.

Avatar

Stoppit! You are taking me back to my childhood. There were no RaspberyPis back then!

Cheers,
Norm.

Avatar

I put together a kit last night to send in fact, just waiting to get time to solder one up (my guess is Rob is going to be far too busy to do so with all his new toys to play with).

Perhaps I should put an un-soldered one in too…
See if you can find someone who has never soldered before to have a go!

When I was experimenting with the board, I came across several area’s of python coding which were hard to find information on (even in proper python books), so expect to see a few more lessons soon.

I would also welcome suggestions for some potential games using the board (I have a few in mind) and plan to try out some POV (persistence of vision) pictures when I get chance.

I am happy to receive feedback and questions about the code examples, so they can be as good as possible.

Avatar

*ambles past nonchalantly, never having soldered anything before*

Avatar

I shall ensure to put a note in for Rob to keep his mitts off that one.
Although you can thank Liz for the small delay! :D

Avatar

Cor, thanks! I will have to try and stop the full-timers from going off and trying to educate a young person with it. You know what they’re like.

Avatar

You: Look around.

Tech Lair: You see a sword, a mace, and a soldering iron.

You: Pick up soldering iron.

TL: A Level 10 Solder Bridge appears in proximity to the Vcc power bus!

You: Pull out desoldering bulb, apply soldering iron to Bridge until it melts.

TL: Nothing happens … Bridge is threatening to short the power grid to ground imminently!

You: DOH! Plug in soldering iron, wave it menacingly while it heats up, apply it to the Bridge when hot, and use desoldering bulb to suck in melted Bridge.

TL: Bridge has been destroyed and the power grid is saved! Uh-oh, here come trouble in the form of a wayward bit of Stranded Wire. It falls across a pair of address bus lines, rendering several I/O devices inaccessible due to their addresses being shorted!

OMG, I think I may have just invented a new sub-genre of an adventure game!

Jim: Picks up keyboard … :D

Avatar

And “Back In The Jugg Againe”…..

A version of the Molesworth-Peason Latin translation machine might be a fun RaspPi project, especially in Scratch!

And as any fule kno, Richard Of York Gave Battle In Vain. Lets not have any of this inaccurate American nursery rhyme stuff. (I can sing a rainbow…. indeed….)

And I must say its nice to see Richard in the news again, even if there’s too much Tudor lies still being spun.

Avatar

“Richard Of York Gave Battle In Vain”
You are quite right, unfortunately “sing a rainbow” sprang to mind first!
Also it was good that it included both “Pink” [very important to have “Pink LEDs”] and put the more difficult “Orange” as an extra challenge near the end.

Avatar

I just tried to purchase the LED kit – sounds fun – and found the site item to be “closed”. Guess that means you ran out??? Please let me know when I can purchase an assembled led kit?

Thank you

Peg

Avatar

The magic of the Raspberry Pi site strikes again!
Yes my small stock of prototype kits was totally blitzed.

I posted an update on my site, I hope to be able to get more parts by the end of this week.

Thanks for the support, it really is appreciated.

Avatar

Richard of York goes battling in vain, was the version I always remember. Quite apt as he has recently arisen!
Texy

Avatar

Damn I’m too slow. Out of stock! =)

Avatar

this is a great power supply : )

http://www.ti.com/product/tps63060

mfg
josehaus

Avatar

Good news. I hope to have more stock before the end of the week, so hopefully will start shipping again before Monday!

Please visit the site to register your interest:
http://pihw.wordpress.com/meltwaters-pi-hardware-kits/rgb-led-kit/

Assuming the new stock tests correctly, I “should” be able to meet all new orders within a week (although I will aim to get them completed and shipped in a day depending on stock).

– Also I’ve put a note on the page Liz has linked to.

Thank you!

Avatar

Good news. I hope to have more stock before the end of the week, so hopefully will start shipping again before Monday!

Please visit the site to register your interest:
http://pihw.wordpress.com/meltwaters-pi-hardware-kits/rgb-led-kit/

Assuming the new stock tests correctly, I “should” be able to meet any new orders within a week (although I will aim to get them completed and shipped in a day if I have stock).

Most of the current orders have been dispatched this morning (just a few which are awaiting assembly / overseas posting).

– Also I’ve put a note on the page Liz has linked to update the purchase link.

Thank you!

Avatar

Ah, double post…sorry, please remove when you have chance.

Avatar

Will 5 LEDs not exceed the maximum current for one GPIO pin?

There isn’t a circuit diagram, but it looks to me like the R,G,B are wired into 3 GPIOs and the common of each LED is wired into another GPIO (making 8 used in total). So all the reds will be in parallel (if you turn them all on).

Avatar

You can drive all 15 (RGB) and only draw…(looks up the manual) just over 20mA. Note I have been as kind as possible to the loading and the LEDs are driven lightly (enough for testing).
You are correct about the wiring (and diagram is included in the manual too).

Avatar

I received my RGB-kit (and PSU-kit) this morning – the instructions are *very* comprehensive, a proper overview of the whole thing, not just a basic “solder this part into this hole, and figure everything else out for yourself” that some other people do. And pre-bending the component leads too is a great idea :)

Highly recommended!

Leave a Comment

Comments are closed