It's all gone quantum at Digimakers

Last Saturday I had a great time at Bristol's Digimakers. I regularly attend this superb event, running a stand and get the opportunity to talk computers and science with children, parents and teachers. This time around I focused on Behaviour-Driven Development (which I've covered before) with a side order or LED and ePaper displays for the Raspberry Pi and Pi Zero from Pi-Supply.
Digimakers June 2016

Several organisations and lots of students ran demonstrations, workshops and drop-in help sessions throughout the day. This is something especially neat about Digimakers: it's not focussed on a single technology as the supposed solution to all scenarios, but instead showcases lots of complementary technologies. We had Raspberry Pi, Arduino, custom things that I don't quite understand and more besides all used as the basis for a number of very interesting projects.

The computer science and engineering students from the University of Bristol continue to impress. Anthony really hit the nail with his sound wave generator which produced a fantastic musical accompaniment for the day when hooked up to Apple's Logic Pro X. If you're reading this and looking to hire an audio engineer then he definitely deserves the job!
Andrew's marvellous musical vibrations

Directly opposite was Matthew Hockley with a swarm of cute robots that were running a simple algorithm related to locality of their neighbours triggering different light patterns. We talked about how us fallible humans like to anthropomorphise whenever given a chance to do so and I postulated that the random movement of his swarm would be seen as "good" or "evil" if he put green smiley faces or red angry faces on top of each robot. Matthew agreed that we do tend to read more into such critters than is deserved as they're not really responsible agents (an update to the Three Laws that were just a plot device for Asimov and not something to base a real robot on) as Alan Winfield notes in his excellent, accessible book, Robotics: A Very Short Introduction.


They appear to be benign, but if you look closely you can see them plotting world domination.

Students and a teacher from Cotham School were back with their arcade cabinet, and this time also had two "Mini Me" versions (as I like to think of them) present. Sadly I forgot to get a photo, but these proved extremely popular. I think the brief goes along the lines of: "yes, you can play computer games at school providing you program those games." It's a great idea, very well executed.

Talking of schools: I had a great chat with Stewart Edmondson, CEO of the UK Electronics Skills Foundation. They believe absolutely that teaching software is not enough and that kids should be getting hands on experience of electronics. I wholeheartedly agree! As I started secondary school in the 1980s I caught the last of the software-related computer lessons before "IT" became "ICT" with the "C" somehow (apparently) meaning "Word & Excel". However I never learnt electronics in school and feel very much I'm enormously behind the learning curve here. Although I've built my own circuits, read lots of tutorials in books and The MagPi magazine and bought and experimented with stacks of components it all does feel very unstructured, as though I am missing the fundamental underpinnings that school ought to have taught me. There is a huge benefit to learning things when your brain is still wired to absorb knowledge like a sponge. At Digimakers they brought along an electronics project kit called MicroBox to get those brain cells firing and this proved very popular.

Ok, so what has all this to do with the title of this post? One of the workshops focussed on Quantum Computing for kids (yes, you did read that right!) While I unfortunately was unable to get away from my stand for long enough to listen in I had a wonderful conversation with a 14 year old girl who popped over afterwards. It started in just the way you don't expect a conversation with a teenager to start: "I'm off to Google to study quantum computing as a way to break ciphers." We then conversed about such things, including a detour to discuss the shape of the universe and the relative sizes of different infinities, the difference between passive and active hacking (which, fortunately she is very aware of - this difference needs to be taught in schools!), that she'd spent the morning learning about ciphers in Python in one of the sessions and that she's already up to speed on inspecting web elements and the like... Awesome. This was the highlight of the day for me.

The next Digimakers is on October 29th at At-Bristol. If you are planning on attending you should register in advance as this event is very popular.
Comments

George visits Digimakers to learn about whiskers

I spent yesterday at Bristol Digimakers having a fantastic time meeting lots of young people who had come along to the event to learn more about coding, robotics, Minecraft, robotics and robotics. There was definitely a theme going on. Digimakers has grown to be the place go to get hands-on experience of hacking and making. Backed by University of Bristol (kudos to the ever-energetic Caroline who does a great deal of the organising) and supported by a host of students and other individuals running their latest coding and hardware inventions a great vibe could be felt all day long.

As usual at Digimakers I set up a table with various demonstrations using Raspberry Pis, mainly focussed around Zumo George, my Behaviour-Driven Development robot. This time around I also included some Crafty Robots, a Hexbug Ant and Cartmanzilla.

Stand

Cartmanzilla_Zumo_Crafty_Hexbug
Cartmanzilla towers over the city. The little robots wonder how they will escape.

The aim of my table was to present two concepts: firstly programming robots based on defining behavioural outcomes (a right to left approach, for example: Event Storming) rather than a list of functional requirements (a left to right approach that may not lead to the desired outcome) allows non-technical people to be more involved in the creation of the robots that they will share their environment with. I've written about BDD with Zumo George before. Distilling the essence of BDD (conversations that discover outcomes of value that enable us to write tests that drive code) down to something that is easily digestible by youngsters proved challenging, but in general most seemed to understand. I think this was helped by having a working demonstration: Zumo George was given the behaviour of "don't get caught by Cartmanzilla" which in practical terms meant using his inbuilt IR sensor to retreat from Cartmanzilla when he approached, and to advance when Cartmanzilla retreated (all over the top of a lovely cityscape given to me by the great Tim Cox).

Secondly, I wanted to explore the idea of how prey avoids predators (and how predators catch prey) by looking at three different robots:
  • Crazy Robot just moves randomly and cannot react objectively to external stimulus (it can however sometimes bounce off things it bumps into)
  • Hexbug Ant has bump sensors front and rear and therefore can run away from anything it touches.
  • Zumo George can sort-of see (via his infrared sensor) what is in front and respond accordingly.
After playing with Cartmanzilla and the robots I asked two questions of the youngsters who came to my table:
  • If you were a mouse escaping from a cat which method (random, touch, sight) would you use to keep away from the cat?
  • If you were a cat trying to catch a mouse which method would you use?
For the first question everyone said sight, which is the obvious answer, as assuming that there is enough light for the mouse to see then this keeps a decent distance between it and the claws. For the second I was genuinely surprised that about a third of the students realised the cat would likely use a combination of sight and touch. Cats do just this: as they approach prey they primarily use sight, but when they make the final strike their whiskers swing forward to make contact with the prey which helps guide their jaws and claws in. To help reinforce this point I played a snippet from a BBC documentary that covers exactly this:



Watch the whole video or skip forward to 2m15s where they explain why and show a cat doing this. As the cat gets very close to the mouse it can no longer focus so it uses its whiskers to guide the prey to its mouth. If you have a pet cat you can likely see this in action: if your cat chases string or small toys then drag a toy in front of the cat to get it to almost-but-not-quite pounce (you may need to do this several times!) When the cat thinks about pouncing, but then gives up you can often (it's quick) see its whiskers twitch: that's the reflex starting to move them forwards (but stopping as the cat gives in). It is harder to see if the cat does pounce as this happens in the blink of an eye.

The interesting thing here is that my robot, Zumo George would benefit from exactly this kind of whisker technology. The Sharp GP2Y0A41SK0F infrared sensor is effective from about 4cm to 30cm. Hence, when an object is closer than ~4cm the sensor's vision is "blurred" and ineffective. This can be seen on the data sheet for the sensor in the graph on page four, which I have reproduced below. This graph shows the voltage returned on the analog pin for a given distance. Below about 3-4 cm the output voltage becomes wildly inaccurate. This is the point at which George's vision blurs resulting in him sometimes advancing and sometimes retreating, seemingly at random: he becomes little better at this distance at avoiding Cartmanzilla than the Crafty Robots.

Sharp_GP2Y0A41SK0F

Fortunately this is generally not a problem as we define the behaviour of George such that he should not get within 4cm of Cartmanzilla in a .features file that our Behaviour-Driven Development tool of choice (Lettuce in my case) can parse:

Feature: Move around the city avoiding monsters
In order for Zumo George to keep a safe distance from the monsters
As Zumo George
I want to retreat when the monsters get near

Rules:
- Retreat if a monster is less than 15 cm away
- Advance if a monster is greater than 15 cm away

From the above feature we have articulated and agreed a general outcome: don't get trodden on by Cartmanzilla as it will ruin your day. We then continue the conversation to discover scenarios of importance. It turns out that there are three, wrapped up in a single line of background in which we agree how close to Cartmanzilla we think is safe, and we add these to the .feature file:

Background:
Given the minimum distance to the monster is 15cm

Scenario: Advance, there are no monsters
When the distance to the monster is 16cm
Then I should "advance" in relation to the monster

Scenario: Stand still, hopeing the monster won't notice me
When the distance to the monster is 15cm
Then I should "halt" in relation to the monster

Scenario: Retreat, there are monsters
When the distance to the monster is 14cm
Then I should "flee" in relation to the monsters


As you can see, we have defined George's behaviour to be that he should attempt, whenever possible, to stay at least 15cm from Cartmanzilla (the monster).

Behaviour-Driven Development works when people have conversations to discover new and different outcomes. It was great to work with the youngsters at my table to vary the minimum distance for George. We could immediately see the little robot scurry backwards when our outcome was that it was unsafe to be so close to Cartmanzilla or to scuttle forwards to a new minimum distance when we felt the outcome was that it was safe to be closed. Being able to talk about, model and try out the effects of varying outcomes in a safe way without causing George to immediately run amok and leap to certain doom from the table edge was great. The kids definitely seemed to enjoy this modelling exercise, and I did too.

Across the rest of the event a large number of other robots could be seen. Here's Steve. He talks back when you talk to him (and sometimes makes embarrassing mistakes):

Steve
This is Steve. Steve was apparently "getting a bit murderous".

Tim Cox ran an excellent workshop and had set up a cityscape full of vehicles, interconnected traffic lights each using PiStop (available from 4tronix) and an enormous (by comparison) Me Arm controllable by a Raspberry Pi and, I'm guessing, python-curses judging by the look of the output on the screen. I was impressed with the Me Arm. I have previously done something similar using the Maplin Robot Arm and the Pi, but I don't like the imprecise geared motors in the Maplin arm. By contrast the Me Arm was much more precise even though it too is not using stepper motors. The screen you can see is from Banggood.com.
MeArm_TimCox2
"Watch out for the Evil Claw" cried the residents of PiCity.

Someone (sorry Someone, I didn't catch your name) had created a Sentry Gun complete with the required "beep......beep.....beep...beep..beep.beep.beep" heard in the film Aliens from the related motion tracker technology.
TrackingGun2
If you hear this noise run away and hide.

A couple of students presented a fruit-music maker connected to a Raspberry Pi. Their approach was different to what I have seen before as they were not relying on one completing a circuit (touch a wire, and with your other hand touch the fruit to make a sound play), but were instead relying on (we think) a capacitive drop when you touched the fruit ("touch the kiwi fruit and absorb its power").... or perhaps it was due to electromagnetic fields. They are currently going through a process of elimination as they learn how exactly this works. However it worked, it worked well.

Fruit_music
Play that funky banana!

Various other workshops and exhibits ran throughout the day including working with a BBC Buggy and separately, Hedgehog Bots controlled by Arduino Nano and invented by Scott and Joe, graduates from University of Bristol. There was also a horizontal scrolling game controlled by a device one wears that picks up on electrical activity in the brain; you moved up by thinking more and down by thinking less... it was important to not actively think about thinking less. Sadly I forgot to get a photo of these great projects.

Saving the best to last there was Josh who presented an AWESOME Persistence of Vision project. Several rows of LEDs spinning at about 1000RPM (I think that was the speed...) He had animations running, could draw and persist a cube or the time and all sorts of other patterns. It looked great, was a tidy build and captivated us all like moths to a light bulb.

Persistance_Of_Vision_PoV_Josh
Must...not...look...at...the...lights. Oooooh shiny.

Digimakers has again lived up to expectations with Caroline and the team keeping everything running smoothly throughout the day.

The next event is currently scheduled for June, hope to see you there.
Comments

Bristol Digimakers February 28th

Why is Bristol Digimakers just the coolest, most fun place to be?


(you may spot me in there on The MagPi stand)

The next Digimakers event takes place on Saturday February 28th: https://www.facebook.com/digimakersbristol
Comments

The MagPi: back from Digimakers, saw something LAZEY

On Saturday I travelled over to Bristol with The MagPi stand featuring George the robot arm (all of my robots are called George. I blame this), a mountain of sweets, HDMIPi and a Saleae logic analyser. Yes, that’s quite a varied collection of kit!

digimakers_oct14_01

The event was absolutely fantastic, with robots everywhere (as you’d hope). One stand had several other Maplin Robot Arms (so George didn’t feel lonely) and was teaching the basics of robot control. LEGO(R) Mindstorms were in abundance and it was great to see programming at various levels (proof positive that the Mindstorm is a pretty decent bit of kit - I’ve spent a lot of time with Mindstorms v2. Even the basic drag-and-drop programming GUI supports up to 32 threads!) One group of kids had a very well thought out Mars exploration challenge setup (this one, I think), programming their Mindstorms v3 rover to overcome all sorts. I chatted with them about threaded programming (Did I mention? 32 threads! Awesome!) and it was really encouraging that they got what I was on about (even though my explanation wasn’t the best - sorry guys, I was running on coffee and two hours sleep from the previous night!) Raspberry Pi Spy has a great photo of the team in action.

I managed to spend a reasonable bit of time showing people how to use the Saleae logic analyser, and talking about how, before I used one, I’d managed to get myself in a right kerfuffle not knowing what was going on with an excellent 3IR line sensor I’d bought from Ryanteck.

Getting HDMIPi working was great. I’d had a bit of an issue with a dodgy USB connector, but Alex Eames of Raspi.tv had sorted this for me just in time. Thank Alex! You’ll be pleased to know that HDMIPi garnered a lot of interest with many a “hey, that’s neat” comment. Here it is with Sintel running, a great (albeit very sad) video from the Blender people.

digimakers_oct14_03

One of the most impressive displays present was the LAZEY Projector, a laser persistence of vision generator by Adam and Joshua, students at Bristol Uni. Roughly speaking you draw an image on a tablet which is sent wirelessly to a Raspberry Pi, which renders the image and sends it to a custom shield that plugs into the Pi, which buffers and then sends commands to a couple of mirrors that reflect the laser light in such a way as to draw the image on screen. Absolutely brilliant. You can see from the photo below that my smartphone’s camera can’t capture the whole image as it is being redrawn many times a second - too fast for us lowly humans to notice, but a camera easily captures it mid-render.

digimakers_oct14_02

Here’s a video of what LAZEY can do. Sweet.


Oh, and it also plays tetris.

Unfortunately I didn’t get a photo of the LAZEY unit but over at Raspberry Pi Spy you can see it up close.

Another stand had a Sudoku solving machine / robot running. This was a neat bit of kit as it would draw a 6x6 grid with a black pen on a whiteboard, then place some initial numbers. You played by trying to solve each square and it would light green for a correct answer or red for an incorrect one. Apparently it was all built in under 24 hours as part of a competition they had previously entered: they could take along all of the parts, but nothing could be pre-assembled. Kudos guys, it was really neat.

There was also a fair bit of interest in the competition that we were jointly running with the organisers. If you need details get in touch via their FB page. Bristol Uni are doing the judging. Good luck to all who enter!

So, with workshops, demonstrations and robots giving out sweets who could ask for more. I had a fantastic day. Hope you did too if you went. If not, the next Digimakers is on 29th November at AT-Bristol in Bristol.
Comments

The MagPi at Bristol Digimakers - with competition prizes

The MagPi has agreed to co-sponsor the competition Bristol Digimakers on the 4th October at the At-Bristol Centre in Bristol. We’re offering up a bundle each of Volumes 1 and 2 of the magazine. Plus one of the organisers, Caroline Higgins from University of Bristol has managed to secure the famous Blue Pi as a prize as well. These colourful Pi’s are like blue-coated gold dust they’re so rare.

I’ll be running The MagPi stand at the event, which is an absolutely top-notch event for people in the South West who find the events in Cambridge and Manchester a might too far to travel. With technology demonstrates from the University of Bristol, local companies and several individuals (no doubt with robots: there are always robots, and robots are a Good Thing) plus a ton of workshops to get your brains around Scratch, Python and various hardware challenges (usually with LEGO(R) Mindstorms, Raspberry Pis and LEDs galore) it’s a fantastic opportunity to meet up with people, brush up on your skills and learn new things.

The event is primarily aimed at kids of all ages, but there are also plenty of teachers, parents and people interested in technology who come along too. The event has a great vibe, with a real buzz around technology. Great stuff.

So what’s going to be going on at The MagPi stand? Well we’re going to have a bundle of hardware goodies for you to see and play with:

  • The new HDMIPi LCD for the Raspberry Pi
  • Traffic lights with PiStop from Tim Cox
  • Using a Slice of Pi/O to control a 3 Line Follower Sensor from Ryanteck. The Slice of Pi/O is a great base upon which to connect various robot sensors and I’ll be showing you how to use this piece of tasty kit.
  • Using a Saleae Loic Analyzer with the Raspberry Pi (using it to show the importance of pull up and pull down)
And yes, the robot arm will be back dishing out sweets to all those that can master the fiddly controls.

Plus a ton of Raspberry Pi books for you to browse to get ideas for that next purchase.

A collection of event links:
https://www.facebook.com/digimakersbristol
http://www.at-bristol.org.uk/2451.html
http://www.eventbrite.com/e/digimakers-saturday-4th-october-2014-tickets-11932533529

digimakers014 digimakers013 digimakers012 digimakers011
A few photos from previous MagPi and other stands at Digimakers (yes those are musical bananas)
Comments

TiddlyBot fun and simple Raspberry Pi Robot

Browsing Kickstarter I just came across the wonderful TiddlyBot by PiBot.

I first met one of the PiBot team at a Raspberry Pi DigiMakers event in Bristol a few months back where I was incredibly impressed by the passion shown and the quality of their PiBot robot. A really compact, very well engineered build. It looks like they’ve come up with something fantastic in the new TiddlyBot, which is currently over on Kickstarter. This little robot can draw, follow lines (curiosity has me wondering if one TiddlyBot could draw a line for another to follow), output a live wireless video feed and be controlled from a web interface. Fantastic.

This looks like enormous fun and is exactly the kind of tech that really gets kids (and adults like me) interested.

Nice one PiBot.

Head over to Kickstarter and support the project now: https://www.kickstarter.com/projects/1320310506/tiddlybot-fun-and-simple-raspberry-pi-robot
TiddlyBot
Comments

RoverBot1 (aka: "George") runs amok on BBC Points West

I feel so honoured. My cunningly crafted (read: “a bit of a bodge, but hey it works”) RoverBot1 who gained the name George at the November DigiMakers event in Bristol has been featured on BBC Points West. Scroll forward to ~53.5 seconds in (or better still, watch the entire article). Yes there he is, scuttling across a table.

Behind the scenes of course it’s probably worth mentioning that George had actually started to run amok and my hand was there trying to coral him away from Certain Doom should he decide to leap from the table top. There he was: Python program running nicely, moving forwards, turning this way and turning that way on command when suddenly I lost control via the keyboard and he refused to respond, with his wheels left permanently turning. I’ve managed to recreate this mishap and it seems that when the battery voltage drops enough the Raspberry Pi freezes and George carries on repeating the last command he was given, which in this case was clearly “run amok”.

Still, it looks good on TV :)

Here’s George before he started misbehaving on The MagPi stand that I jointly ran with Meltwater of pihardware.com.
DigiMakers_November_TheMagPi
Comments