Raspberry Pi robotics research project generates a decentralized swarm!

A group of researches at Northwestern University in Illinois, USA have used 100 Raspberry Pis on a small robot chassis to develop swarm behaviour. Without centralised control, these robots form shapes by communicating with each other. The robots don’t “care” which robot is in which position, but they all have the same goal so they can autonomously decide to swap positions or destinations depending on their relative positions and direction of travel. Due to the distributed nature of the movement algorithm, the researchers are confident that the robots will always end up defining the correct shape, without deadlocks. As far as they know, this algorithm is unique in its approach and the first to be able to do the task without getting in a pickle!

The robots (known as Coachbots) look like they use either 3B+ Raspberry Pis or version 4s, as they have the heat spreader covering over the CPU. Project lead Mike Rubenstein was interviewed by email by the IEEE for Spectrum and you can read more there.

You can see a video of the robots in action below. Thanks to Steampunk_prof for noticing this one and tweeting it.

New Kickstarter from SB Components for metal-gear servos controllable from various single board computers

SB Components has just launched a new Kickstarter for two types of servos with metal gears. These are perfect for robotics projects where you need something strong:

  • SB-SS023 has a max torque of 2.3 Kg.cm helpful in lightweight robotic projects. This servo has dimensions of 23.2 x 12 x 25.5 mm(on the left and right).
  • SB-SS15 has a max torque of 15 Kg.cm with dimensions 40 x 20 x 40.5 mm is for heavier applications(in the middle).

You can see the campaign video below:

And you can read more about the campaign here.

Adventures in I2C: clock stretching on the Raspberry Pi

This is a bit complicated, technically, but I’ve been asked to document the issue just in case someone comes across it.

I was getting I2C read errors when using the new TE AmbiMate MS4 sensor board (review coming soon!) with the Raspberry Pi 4. I contacted TE about it and they asked me to try a Pi 3. So I did, and it worked absolutely fine.

It was an intermittent issue on the Pi 4 (everyone’s favourite sort of error!), and so I did some research and found some information on something called ‘clock stretching‘.

This apparently affects the Raspberry Pi and was documented in a lot of detail, back in 2013 by someone at Advamation. Here is that post.

Although I found evidence on the Raspberry Pi forums that it had been fixed on the Pi 4, this is apparently not the case as it was a Pi 4 I was getting the problem on.

I tried a good old-fashioned apt-get update and upgrade and tried it again. No joy.

I was pointed at this GitHub issue which implied that the problem still exists. It suggested adding a line to /boot/config.txt


which forces the Pi to use the old I2C driver. This failed to work, in fact it made the problem worse because suddenly it wouldn’t read anything from the sensor. I reversed this.

I tried an rpi-update to get the latest firmware, just in case a fix had been implemented on a newer version. This again failed to work.

Eventually, after some searching around (good ol’ Google!) I came across this issue on GitHub which suggested that the problem was the speed at which I was trying to read the I2C bus. So, I added a config option to /boot/config.txt as follows to reduce the read speed from 100000 baud to 10000 baud:


Miraculously, this worked and I received stable readings from all the sensors on the AmbiMate without the errors occurring.

I came across an alternative solution (which I haven’t tried). Apparently, the bug only affects hardware clock stretching. However, it is possible to use an alternate set of pins for I2C and use software clock stretching. This is documented on GitHub here. Here is the relevant bit:

Raspbian has a software I2C driver that can be enabled by adding the following line to /boot/config.txt:


This will create an I2C bus called /dev/i2c-3. SDA will be on GPIO23 and SCL will be on GPIO24 which are pins 16 and 18 on the GPIO header respectively.

I hope this is of some use to someone!

Book review: Raspberry Pi Projects for Kids (by Dan Aldred)

I was sent a review copy of this book by No Starch, but I can say what I like 🙂

The author

According to the blurb in the first couple of pages, Dan Aldred is a Computer Science teacher, freelance writer and hacker. He’s also a Raspberry Pi Certified Educator, so he should certainly know how to write a book with this title. I’m happy to say that he delivers, and then some.

About the book as a publication

First of all, this is a No Starch publication. If you’ve seen past reviews from me of No Starch books, you’ll know I hold them in high regard in terms of the quality they produce. This one is no exception. It’s full colour, has over 260+ pages and is nicely bound.

The whimsical cover gives you an idea who the book is aimed at, and Dan has a great turn of phrase and uses clear, basic English to get across concepts and instructions. It’s ideal for young teens, for instance, but will also be attractive to Pi beginners who need projects to get themselves going on.


There is a good introduction detailing how to use the book, and the equipment you’ll need. This is followed by a, by now obligatory, introduction to the Raspberry Pi, its capabilities and the way you’ll be working with it. An introduction to Python competes the introductory chapters and it includes some information on how Python works in terms of functions, loops etc. It’s a great chapter for those used to other computer languages, although perhaps it could have had a bit on how to go from visual block-based programming to text-based programming, considering the target audience.


The rest of the book is a series of projects to build based on the Pi with other, added components such as a Pi camera, LEDs etc. These components are all listed in a previous chapter, but if you want to do them one at a time, the individual chapters also list what you need. The projects are as follows:

  • Hot glue night light – using a silicon ice-cube mould and an LED to create a small light.
  • Selfie snapper – the first Pi camera project.
  • Pi Spy part 1 – using a normal webcam for surveillance.
  • Manipulating Minecraft – how to use Python to “hack” into Minecraft. (This is similar to a lot of other starter projects involving Minecraft, but it’s good to see what I would term an “old reliable” make a comeback).
  • Radio invasion – using the Pi as an FM transmitter.
  • Automatic texting machine – using the Pi to send SMS messages using an external service.
  • Pi Spy part 2 – tracking devices using Bluetooth and wifi..
  • Magic music box – using the Pi as a music source for a speaker.
  • Nature box – using a camera to detect motion.
  • Smart plugs – using the Energenie smart plug system with the Pi.
  • Mirror Mirror – using the Pi and a monitor behind a mirror to display social media updates.
  • Computer games with the SenseHAT – uses the Pi and the SenseHAT as a game display and controller.

It’s an eclectic mix, but I think the book is stronger for that as it gives kids (and adults, for that matter) a variety that they can pick-and-choose their way through.

The colour diagrams and pictures help to keep the book engaging throughout, and I must compliment the author and the publishers for the layout, especially.


This book is ideal for those who have either just got their Pi and are in their early teens, or perhaps slightly younger, and also those who have used the Pi for a bit and want something to get their teeth into. The range of projects is exciting and varied, although perhaps slightly equipment-heavy. Having said that, the Pi camera and other components are quite cost-effective and the SenseHAT, which is more expensive, is only used in the last chapter, so can easily be avoided if you don’t want to make the additional investment.

So, all in all, I can happily give this book a hearty recommendation. A great post-Christmas present for your child who has got their Raspberry Pi and is wondering what to do with it! 🙂

Buying the book

You can pick up Raspberry Pi Projects for Kids from No Starch (if you’re in the US or you want an electronic version) or from Amazon if you’re UK/Europe-based. Other retailers are available 🙂

Christmas 2019 gifts round-up for Raspberry Pi, micro:bit and more!

Hi everyone. I thought it might be nice to put out a blog post with some great gift ideas for the Raspberry Pi/electronics/robotics/micro:bit person in your life who might like to have a little something to open at Christmas 🙂 This post comes with a piece of advice: Watch out for Black Friday (week) deals!


Let’s start off with a gift for someone who might just be about to start their Raspberry Pi journey. The Official Raspberry Pi 4 Desktop Kit is lovely. It comes with everything you need to get started, including a great Beginner’s Guide book. Also included is the official keyboard and mouse, as well as the Pi, a case, an SD card and monitor cables. You could also look at The Pi Hut’s Starter Kit which is cheaper (but doesn’t have the keyboard/mouse) or Pimoroni’s equivalent kit which comes with slightly different items.

Festive Fun

If you’re looking for a couple of stocking fillers, take a look at The Pi Hut’s website for their Christmas tree range or alternatively, pre-order Pimoroni’s new offering: a Snowflake LED board.


If you think that special someone might appreciate some robotics fun, take a look over on 4tronix’s website for some Raspberry Pi and micro:bit goodies. Gareth has just launched the MARS Rover for micro:bit kit (pictured above). It’s just lovely and well worth the money if you want something a bit more expensive. If you want something at the lower end, you could also take a look at the Bit:Bot XL for micro:bit which comes in at £42. There are Raspberry Pi goodies too, so have a browse!

If they’re just starting out with robotics, take a look at the CamJam EduKit 3 which is a great little starter kit that myself and Tim Richardson designed and produced in partnership with The Pi Hut. It gets you going on your journey and includes a set of downloadable worksheets to teach you what you need to know.

And finally, if you want something a bit different, take a look at PiBorg’s RockyBorg which is a steerable robotics platform.


Pimoroni have just launched their Pirate Audio range which is a collection of audio boards to suit a variety of tastes for £19.50 plus shipping. These are fairly low-power audio devices, but they look gorgeous as usual and produce a nice sound on a small scale.

If you or your loved one is an ‘audiophile’ and you want to drive more powerful speakers, I thoroughly recommend IQaudIO’s boards. These are high-quality, beautifully designed and really pack a punch.

3D printing

If your enthusiast is into 3D printing, getting some filament for them (check the size they need!) is one way to win your way into their hearts… Well, you know what I mean.

Pimoroni have just started stocking some nice-looking filaments but if you want a 3D printing specialist, I recommend 3D Printz who are based up in Shropshire.

High class Add-ons

For add-on boards, you will want to check out the RasPiO website – there’s plenty on there that you might not have seen before. Alex Eames has been in the Pi community from the very beginning and he’s created some great boards including the Breadboard Pi Bridge (above), an Arduino-powered Night Light kit (which is great fun to put together as you can read in my beta review) and the Pro HAT which puts the GPIO pins in the right order!

LoRa LoRa Laughs

If your Pi/micro:bit enthusiast is into long-range communication, take a look at Pi Supply’s LoRa range.


That’s all, folks

There is plenty of other electronics wizardry out there, just take a look around.

Remember, though: the true joy of Christmas is spending time with your loved ones, cherishing that time and making the most of the Winter break, if you get one! There’s also the small matter of the birth of Christ, but I know my readership is mixed so I won’t go on about that – if you know me well, you know how I feel about Jesus and his love for the world. Hopefully you’ll hear from me again on or around Christmas. Until then: Keep warm!