Meltwater's RGB LED libraries lesson

20th of February 2013 by liz
submit to reddit

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? :)

 

 

Buy a Pi!

buyapi

buypiswag
News Archives

Supported by


In the forums
  • Hardware_man, 58 seconds ago: CSI camera module • Re: My Quadcopter with Raspberry Pi Camera
    Three quick things:1.In audio work, the $20 word is “tandem coder artifacts”. That’s when you compress an audio file with a “perceptual” coder, expand the file back to PCM and then compress it again with a different perceptual coder. The…
  • jtb, 58 seconds ago: General discussion • Re: 22/7
    HiSorry to confuse you all !But rasperries are actually fruits/berriesAnd the rasberries should be mature just before 22/7, it must be the right day !Jan
  • hmoulding, 4 minutes ago: Troubleshooting • Re: Google works, but nothing else
    hmoulding wrote:It works fine, until I reboot the PC and the settings revert to the bad ones. I don't know yet how to prevent that from happening. The store=persistent parameter is supposed to save it so that it stays over…
  • RamonV, 7 minutes ago: Media centres • Re: Raspbian Xbmc
    Hopefully these additional details may help others resolve any issues with running Raspbian + XBMC.For clarification, I'm using this primarily as a playback client (Hulu, Shoutcast and other streaming plugins, and music and videos shared from another computer on the…
  • latki8, 9 minutes ago: Troubleshooting • Re: Broken /etc/network/interfaces
    Try connecting it to a tv and keyboard and either in console mode (before startx), or by double-clicking the LX-terminal icon, enter: sudo nano /etc/network/interfacesThis will show you the contents of the file. It should have these basic entries:auto loiface…

On Twitter
  • Raspberry_Pi, 3 hours ago
    Hackspaces! Sharks! Open water! Is this the coolest Pi project yet? (It's certainly the deepest.) http://t.co/u59MRM4hXe Cambridge, UK
  • niknaknet, 6 hours ago
    @Raspberry_Pi looks like #rhschelsea University of Lincoln garden won gold - appears to be Pi-Powered http://t.co/iSLLURv6bc Chelsea Harbour
  • ryanteck, 6 hours ago
    One year of the @Raspberry_Pi :D - http://t.co/3JveUYkyAn Stevenage, United Kingdom
  • RasPiTV, 8 hours ago
    Which is better? Stills mode or video mode on the @raspberry_pi camera? Comparison here... http://t.co/bqbnrwGQEg Oxfordshire

Friends of Pi