Internet-controlled #RaspberryPi Christmas decoration using PiRingo @4tronix_uk

Introduction

The PiRingo is a lovely little board from 4tronix. It has a ring of 12 LEDs and two switches and is plugged directly into the GPIO socket of the Pi. It comes in 5 different flavours (which are basically just different combinations of LED colours): I went with the Fairy Lights design which included 3 blues, 3 reds, 2 yellows, 2 greens and 2 whites.

You can read more about the PiRingo over at the 4tronix website and you can purchase it for £8.30 (ish) here.

Solder and set-up

It took about 45 minutes to solder (but I enjoy soldering and took my time!) and I plugged it straightaway into my new Chinese Raspberry Pi (one of the red ones). If you’re going to do this, I recommend starting with a new image of Raspbian. I tried with an existing install and didn’t have much luck with it – I think it has something to do with the serial port being enabled and having a console run on it. But no matter, I had a spare SD card and it only took half an hour to download and write the image.

What do I do with it?

I then had to decide what to do with it. We happened to be watching an episode of The Big Bang Theory at the time and the boys had rigged their apartment’s electrical equipment up so that it could be controlled by anyone anywhere over the internet.  Aha! I thought. Internet-controlled Christmas decoration!

First of all, I wrote a Python script which simply cycled the 12 LEDs in a circuit. Note to the wise: don’t stare at the lights! That script can be found on GitHub.

Very pretty, I thought. But how do I get it so that other people across the world can control it? I thought I’d start simple and create a web server with a page that would just run the LED cycle. I knew it was possible to create a webserver in Python so I looked up how to do it (I finally found it here) and adapted it to catch the (non-existent) cycle.py page, which then ran the function to cycle the LEDs. The web server code can be found here. By putting these two scripts into the same folder and then running:

sudo python server.py

… I got a web server running on port 8080. The next thing to do was to set up port forwarding on my router. I’m not going to describe how to do that here as it’s different depending on which router you have. You might try looking here, for instance, or Google your router with the phrase ‘port forwarding’.

I can now allow other people to control the PiRingo. I’m not on a static IP though so I’ll have to figure out some way around that, but it does work. Within a few minutes of tweeting the URL to use, the PiRingo was flashing away 🙂

Future work

  • Create a page where individual lights can be controlled.
  • Create a page where you can define your own lighting sequence and save it for others to use.
  • Set up the camera module so that people can see it working… but that might be overkill.

Pimoroni now stocks the Laika robotics board for #RaspberryPi

Following their successful Kickstarter campaign, Team Laika has licenced Pimoroni to sell their excellent robotics board, the Laika Explorer. This board has the following:

  • 2x analogue and 4x digital inputs – to connect sensors, switches and other input devices.
  • 7x digital outputs – to control LEDs, motors, sounders and other output devices.
  • 2x H-Bridge motor driver circuit – to allow two motors to be driven in forward, reverse or brake, ideal for creating robots and buggies.
  • 4x built-in switches – to allow convenient interaction between hardware and software.
  • 7x indicator LEDs – present on each digital output for easy diagnostics.

It’s selling for £35 which I reckon is a bargain considering. It connects via USB, leaving all your GPIO ports on the Pi free.

Read more over at Pimoroni or visit Project Laika’s website.

Wall mounted Google Calendar with #RaspberryPi

Alex Pine has written a decent Instructable on the steps required to get a Google Calendar display that can be mounted on a wall in your house/office. It takes you through the software you need to install (including the SD card operating system). It’s not the most exciting project ever, but it is a pretty neat solution for families seeking to simplify their schedules!

Read it here

Breadboarding for beginners for the #RaspberryPi

The guys over at MakerSpaceUK have written an excellent little tutorial that will help you get started with creating your first circuit using a breadboard and some LEDs. There’s even a kit you can buy through Farnell for less than £5. It’s a nice little project that will have you programming, in Python, a traffic light sequence. Sure, it’s been done before, but it’s beautifully documented and photographed.

Read it here